changeset 55579:4ce8e03602e1

8226566: [JVMCI] java.* classes are no longer necessarily resolved by the boot class loader Reviewed-by: kvn, dlong
author dnsimon
date Wed, 03 Jul 2019 11:07:48 -0700
parents 618ad1237e73
children 7276ccf6c29b
files src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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);