mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-11 15:38:44 +00:00
8149472: NPE when executing HotSpotConstantReflectionProvider::constantEquals with null first arg
Reviewed-by: twisti, kvn, dnsimon
This commit is contained in:
parent
3e3ac8f318
commit
bf33c21af5
@ -26,6 +26,7 @@ import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntimeProvider.getArrayBaseOffset;
|
||||
import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntimeProvider.getArrayIndexScale;
|
||||
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.Objects;
|
||||
|
||||
import jdk.vm.ci.common.JVMCIError;
|
||||
import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.Option;
|
||||
@ -70,7 +71,7 @@ public class HotSpotConstantReflectionProvider implements ConstantReflectionProv
|
||||
} else if (x instanceof HotSpotObjectConstantImpl) {
|
||||
return y instanceof HotSpotObjectConstantImpl && ((HotSpotObjectConstantImpl) x).object() == ((HotSpotObjectConstantImpl) y).object();
|
||||
} else {
|
||||
return x.equals(y);
|
||||
return Objects.equals(x, y);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user