8226566: [JVMCI] java.* classes are no longer necessarily resolved by the boot class loader
Reviewed-by: kvn, dlong
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java Thu Jun 13 19:37:49 2019 +0200
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java Wed Jul 03 11:07:48 2019 -0700
@@ -838,10 +838,8 @@
// Primitive type resolution is context free.
return true;
}
- if (elementType.getName().startsWith("Ljava/")) {
- // Classes in a java.* package can only be defined by the
- // boot class loader. This is enforced by ClassLoader.preDefineClass()
- assert hasSameClassLoader(runtime().getJavaLangObject());
+ if (elementType.getName().startsWith("Ljava/") && hasSameClassLoader(runtime().getJavaLangObject())) {
+ // Classes in a java.* package defined by the boot class loader are always resolved.
return true;
}
HotSpotResolvedObjectTypeImpl otherMirror = ((HotSpotResolvedObjectTypeImpl) accessingClass);