src/share/vm/classfile/javaClasses.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/classfile/javaClasses.cpp Thu Nov 17 10:32:51 2016
--- new/src/share/vm/classfile/javaClasses.cpp Thu Nov 17 10:32:50 2016
*** 3523,3544 ****
--- 3523,3551 ----
cl = parent(cl);
}
return false;
}
oop java_lang_ClassLoader::non_reflection_class_loader(oop loader) {
+ // Return true if this is one of the class loaders associated with
+ // the generated bytecodes for reflection.
+ bool java_lang_ClassLoader::is_reflection_class_loader(oop loader) {
if (loader != NULL) {
+ Klass* delegating_cl_class = SystemDictionary::reflect_DelegatingClassLoader_klass();
+ // This might be null in non-1.4 JDKs
+ return (delegating_cl_class != NULL && loader->is_a(delegating_cl_class));
+ }
+ return false;
+ }
+
+ oop java_lang_ClassLoader::non_reflection_class_loader(oop loader) {
// See whether this is one of the class loaders associated with
// the generated bytecodes for reflection, and if so, "magically"
// delegate to its parent to prevent class loading from occurring
// in places where applications using reflection didn't expect it.
Klass* delegating_cl_class = SystemDictionary::reflect_DelegatingClassLoader_klass();
// This might be null in non-1.4 JDKs
if (delegating_cl_class != NULL && loader->is_a(delegating_cl_class)) {
+ if (is_reflection_class_loader(loader)) {
return parent(loader);
}
}
return loader;
}
oop java_lang_ClassLoader::unnamedModule(oop loader) {
assert(is_instance(loader), "loader must be oop");
src/share/vm/classfile/javaClasses.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File