-
Enhancement
-
Resolution: Fixed
-
P4
-
19
-
b18
The second "if" block below was added in JDK-8267347
https://github.com/openjdk/jdk/blob/1864481df10d2f616cbfdecebf3bebbae04de5e1/src/hotspot/share/classfile/systemDictionaryShared.cpp#L1047
SystemDictionaryShared::record_linking_constraint() {
....
if (!is_system_class_loader(klass_loader) &&
!is_platform_class_loader(klass_loader)) {
...
return;
}
if (DumpSharedSpaces && !is_builtin(klass)) {
// During static dump, unregistered classes (those intended for
// custom loaders) are loaded by the boot loader. Need to
// exclude these for the same reason as above.
// This should be fixed byJDK-8261941.
return;
}
SinceJDK-8261941, unregistered classes are loaded by URLClassLoaders created by UnregisteredClasses::create_url_classloader(). Thus, they will be covered by the first "if" block.
So the second "if" block can be removed and replaced with
assert(is_builtin(klass), "must be");
https://github.com/openjdk/jdk/blob/1864481df10d2f616cbfdecebf3bebbae04de5e1/src/hotspot/share/classfile/systemDictionaryShared.cpp#L1047
SystemDictionaryShared::record_linking_constraint() {
....
if (!is_system_class_loader(klass_loader) &&
!is_platform_class_loader(klass_loader)) {
...
return;
}
if (DumpSharedSpaces && !is_builtin(klass)) {
// During static dump, unregistered classes (those intended for
// custom loaders) are loaded by the boot loader. Need to
// exclude these for the same reason as above.
// This should be fixed by
return;
}
Since
So the second "if" block can be removed and replaced with
assert(is_builtin(klass), "must be");
- relates to
-
JDK-8261941 Use ClassLoader for unregistered classes during -Xshare:dump
- Resolved