@@ -732,28 +732,34 @@ private FieldValue getEnterpriseValue(Instance loc, String className, Instance d
732
732
}
733
733
if (className .contains ("IntArrayLocation" )) { // NOI18N
734
734
Integer index = (Integer ) loc .getValueOfField ("index" ); // NOI18N
735
- Instance actualLoc = (Instance ) loc .getValueOfField ("arrayLocation" ); // NOI18N
736
- ObjectFieldValue arrayVal = (ObjectFieldValue ) getValueImpl (actualLoc , dynamicObject );
737
- PrimitiveArrayInstance arr = (PrimitiveArrayInstance ) arrayVal .getInstance ();
735
+ PrimitiveArrayInstance arr = getPrimitiveArray (loc , dynamicObject );
738
736
return getFieldValue (dynamicObject , arr .getValues ().get (index ));
739
737
}
740
738
if (className .contains ("DoubleArrayLocation" )) { // NOI18N
741
739
Integer index = (Integer ) loc .getValueOfField ("index" ); // NOI18N
742
- Instance actualLoc = (Instance ) loc .getValueOfField ("arrayLocation" ); // NOI18N
743
- ObjectFieldValue arrayVal = (ObjectFieldValue ) getValueImpl (actualLoc , dynamicObject );
744
- PrimitiveArrayInstance arr = (PrimitiveArrayInstance ) arrayVal .getInstance ();
740
+ PrimitiveArrayInstance arr = getPrimitiveArray (loc , dynamicObject );
745
741
return getFieldValue (dynamicObject , getDouble (getLong (arr , index )));
746
742
}
747
743
if (className .contains ("LongArrayLocation" )) { // NOI18N
748
744
Integer index = (Integer ) loc .getValueOfField ("index" ); // NOI18N
749
- Instance actualLoc = (Instance ) loc .getValueOfField ("arrayLocation" ); // NOI18N
750
- ObjectFieldValue arrayVal = (ObjectFieldValue ) getValueImpl (actualLoc , dynamicObject );
751
- PrimitiveArrayInstance arr = (PrimitiveArrayInstance ) arrayVal .getInstance ();
745
+ PrimitiveArrayInstance arr = getPrimitiveArray (loc , dynamicObject );
752
746
return getFieldValue (dynamicObject , Long .toString (getLong (arr , index )));
753
747
}
754
748
return null ;
755
749
}
756
750
751
+ private PrimitiveArrayInstance getPrimitiveArray (Instance loc , Instance dynamicObject ) {
752
+ Instance actualLoc = (Instance ) loc .getValueOfField ("arrayLocation" ); // NOI18N
753
+ PrimitiveArrayInstance arr ;
754
+ if (actualLoc == null ) {
755
+ arr = (PrimitiveArrayInstance ) dynamicObject .getValueOfField ("extVal" ); // NOI18N
756
+ } else {
757
+ ObjectFieldValue arrayVal = (ObjectFieldValue ) getValueImpl (actualLoc , dynamicObject );
758
+ arr = (PrimitiveArrayInstance ) ((ObjectFieldValue )arrayVal ).getInstance ();
759
+ }
760
+ return arr ;
761
+ }
762
+
757
763
private Object getValueOfNextField (Instance dynamicObject , String fieldName ) {
758
764
int i = fieldName .length ()-1 ;
759
765
for (; i >=0 && Character .isDigit (fieldName .charAt (i )); i --);
0 commit comments