| 114 | |
| 115 | == ENUM 型の扱いが厳密になってる == |
| 116 | |
| 117 | CSS 3.1.2では、IOCのbiやmbbiにZRST,ONST等の設定がなくても処理してくれたが、CSS 3.2.16は |
| 118 | |
| 119 | {{{ |
| 120 | Traceback (most recent call last): |
| 121 | File "<script>", line 11, in <module> |
| 122 | at org.epics.vtype.IVEnum.<init>(Unknown Source) |
| 123 | at org.epics.vtype.ValueFactory.newVEnum(Unknown Source) |
| 124 | at org.csstudio.simplepv.utilitypv.UtilityPV.iValueToVType(Unknown Source) |
| 125 | at org.csstudio.simplepv.utilitypv.UtilityPV.getValue(Unknown Source) |
| 126 | at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source) |
| 127 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) |
| 128 | at java.lang.reflect.Method.invoke(Unknown Source) |
| 129 | |
| 130 | java.lang.IndexOutOfBoundsException: java.lang.IndexOutOfBoundsException: VEnum index must be within the label range |
| 131 | }}} |
| 132 | |
| 133 | というような例外が発生する。 |
| 134 | |
| 135 | CSS 3.2.16のソースコードでは、 |
| 136 | |
| 137 | {{{ |
| 138 | public IVEnum(int index, List<String> labels, Alarmn alarm, Time time) { |
| 139 | super(alarm, time); |
| 140 | if (index < 0 || index >= labels.size()) { |
| 141 | throw new IndexOutOfBoundsException("VEnum index must be within the label range"); |
| 142 | } |
| 143 | this.index = index; |
| 144 | this.labels = labels; |
| 145 | } |
| 146 | }}} |
| 147 | |
| 148 | となっている。 |