Skip to content

Commit 9b4aa2d

Browse files
Fix NPE when looking up package-less classes in the boot registry.
We should never resolve package-less classes in the modules file.
1 parent 00918bb commit 9b4aa2d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/hub/registry/BootClassRegistry.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ public synchronized Class<?> doLoadClass(Symbol<Type> type) {
6969
// Only looking into the jimage for now. There could be appended elements.
7070
// see GraalServices.getSavedProperty("jdk.boot.class.path.append")
7171
String pkg = packageFromType(type);
72+
if (pkg == null) {
73+
return null;
74+
}
7275
try {
7376
String moduleName = ClassRegistries.getBootModuleForPackage(pkg);
7477
if (moduleName == null) {

0 commit comments

Comments
 (0)