mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
Merge
This commit is contained in:
commit
f09c55c0d8
223 changed files with 3109 additions and 1504 deletions
|
@ -3525,17 +3525,24 @@ bool java_lang_ClassLoader::is_trusted_loader(oop loader) {
|
|||
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) {
|
||||
// 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)) {
|
||||
return parent(loader);
|
||||
}
|
||||
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.
|
||||
if (is_reflection_class_loader(loader)) {
|
||||
return parent(loader);
|
||||
}
|
||||
return loader;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue