@@ -732,28 +732,34 @@ private FieldValue getEnterpriseValue(Instance loc, String className, Instance d
732732 }
733733 if (className .contains ("IntArrayLocation" )) { // NOI18N
734734 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 );
738736 return getFieldValue (dynamicObject , arr .getValues ().get (index ));
739737 }
740738 if (className .contains ("DoubleArrayLocation" )) { // NOI18N
741739 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 );
745741 return getFieldValue (dynamicObject , getDouble (getLong (arr , index )));
746742 }
747743 if (className .contains ("LongArrayLocation" )) { // NOI18N
748744 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 );
752746 return getFieldValue (dynamicObject , Long .toString (getLong (arr , index )));
753747 }
754748 return null ;
755749 }
756750
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+
757763 private Object getValueOfNextField (Instance dynamicObject , String fieldName ) {
758764 int i = fieldName .length ()-1 ;
759765 for (; i >=0 && Character .isDigit (fieldName .charAt (i )); i --);
0 commit comments