Skip to content

Commit 41dceaf

Browse files
committed
GH-628 handle case when locArrayLocation is null
1 parent 3e090a9 commit 41dceaf

File tree

1 file changed

+8
-3
lines changed
  • visualvm/heapviewer.truffle/src/org/graalvm/visualvm/heapviewer/truffle/dynamicobject

1 file changed

+8
-3
lines changed

visualvm/heapviewer.truffle/src/org/graalvm/visualvm/heapviewer/truffle/dynamicobject/DynamicObject.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,7 @@ private FieldValue getObfuscatedEnperpriseValue(Instance loc, String className,
896896
locIndex = (Integer) loc.getValueOfField(f.getName());
897897
}
898898
}
899-
if (locIndex != null && locArrayLocation != null) {
899+
if (locIndex != null) {
900900
return getObfuscatedEnterpriseArrayLocation(dynamicObject, locIndex, locArrayLocation, locAllowInt);
901901
}
902902
}
@@ -910,8 +910,13 @@ private FieldValue getObfuscatedEnperpriseValue(Instance loc, String className,
910910
}
911911

912912
private FieldValue getObfuscatedEnterpriseArrayLocation(Instance dynamicObject, Integer index, Instance actualLoc, Boolean allowInt) {
913-
ObjectFieldValue arrayVal = (ObjectFieldValue) getValueImpl(actualLoc, dynamicObject);
914-
Instance array = arrayVal.getInstance();
913+
Instance array;
914+
if (actualLoc != null) {
915+
ObjectFieldValue arrayVal = (ObjectFieldValue) getValueImpl(actualLoc, dynamicObject);
916+
array = arrayVal.getInstance();
917+
} else {
918+
array = getEnterpriseObjectStore(dynamicObject);
919+
}
915920
if (array instanceof PrimitiveArrayInstance) {
916921
PrimitiveArrayInstance arr = (PrimitiveArrayInstance) array;
917922
if (allowInt != null) {

0 commit comments

Comments
 (0)