src/hotspot/share/classfile/systemDictionary.cpp
changeset 58486 dcb418f5aabd
parent 58261 01c5971b0a2c
child 58499 d62c7224d5b7
--- a/src/hotspot/share/classfile/systemDictionary.cpp	Mon Oct 07 17:12:22 2019 +0200
+++ b/src/hotspot/share/classfile/systemDictionary.cpp	Mon Oct 07 11:29:10 2019 -0700
@@ -1432,6 +1432,11 @@
         // a named package within the unnamed module.  In all cases,
         // limit visibility to search for the class only in the boot
         // loader's append path.
+        if (!ClassLoader::has_bootclasspath_append()) {
+           // If there is no bootclasspath append entry, no need to continue
+           // searching.
+           return NULL;
+        }
         search_only_bootloader_append = true;
       }
     }