# HG changeset patch # User kshefov # Date 1458036043 -10800 # Node ID 8167f548e63c0b1feb52fac3b24045a4ae4a11a4 # Parent 59b58343d3587dc5c0ece790cacf9beb0dd062e4 8150850: [JVMCI] NPE when executing HotSpotConstantReflectionProvider.readStableFieldValue Reviewed-by: twisti, dnsimon diff -r 59b58343d358 -r 8167f548e63c hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantReflectionProvider.java --- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantReflectionProvider.java Mon Mar 14 17:51:25 2016 +0100 +++ b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantReflectionProvider.java Tue Mar 15 13:00:43 2016 +0300 @@ -339,7 +339,7 @@ public JavaConstant readStableFieldValue(ResolvedJavaField field, JavaConstant receiver, boolean isDefaultStable) { JavaConstant fieldValue = readNonStableFieldValue(field, receiver); - if (fieldValue.isNonNull()) { + if (fieldValue != null && fieldValue.isNonNull()) { JavaType declaredType = field.getType(); if (declaredType.getComponentType() != null) { int stableDimension = getArrayDimension(declaredType);