Skip to content

Commit

Permalink
Set module to Java.base before java.base is created.
Browse files Browse the repository at this point in the history
Fixes eclipse-openj9#2839

Signed-off-by: hangshao <hangshao@ca.ibm.com>
  • Loading branch information
hangshao0 committed Sep 14, 2018
1 parent a640b21 commit 186941d
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions runtime/vm/createramclass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2803,14 +2803,10 @@ internalCreateRAMClassFromROMClass(J9VMThread *vmThread, J9ClassLoader *classLoa
module = javaVM->unamedModuleForSystemLoader;
}
} else {
if (J9ROMCLASS_IS_PRIMITIVE_TYPE(romClass)
|| (LOAD_LOCATION_PATCH_PATH == locationType)
|| (LOAD_LOCATION_MODULE == locationType)
) {
module = javaVM->javaBaseModule;
} else {
module = javaVM->unamedModuleForSystemLoader;
}
/* Ignore locationType and assign all classes created before the java.base module is created to java.base.
* This matches the RI implementation. Validated on JDK9 through JDK11.
*/
module = javaVM->javaBaseModule;
}
}
}
Expand Down

0 comments on commit 186941d

Please sign in to comment.