3523 cl = parent(cl); |
3523 cl = parent(cl); |
3524 } |
3524 } |
3525 return false; |
3525 return false; |
3526 } |
3526 } |
3527 |
3527 |
3528 oop java_lang_ClassLoader::non_reflection_class_loader(oop loader) { |
3528 // Return true if this is one of the class loaders associated with |
|
3529 // the generated bytecodes for reflection. |
|
3530 bool java_lang_ClassLoader::is_reflection_class_loader(oop loader) { |
3529 if (loader != NULL) { |
3531 if (loader != NULL) { |
3530 // See whether this is one of the class loaders associated with |
|
3531 // the generated bytecodes for reflection, and if so, "magically" |
|
3532 // delegate to its parent to prevent class loading from occurring |
|
3533 // in places where applications using reflection didn't expect it. |
|
3534 Klass* delegating_cl_class = SystemDictionary::reflect_DelegatingClassLoader_klass(); |
3532 Klass* delegating_cl_class = SystemDictionary::reflect_DelegatingClassLoader_klass(); |
3535 // This might be null in non-1.4 JDKs |
3533 // This might be null in non-1.4 JDKs |
3536 if (delegating_cl_class != NULL && loader->is_a(delegating_cl_class)) { |
3534 return (delegating_cl_class != NULL && loader->is_a(delegating_cl_class)); |
3537 return parent(loader); |
3535 } |
3538 } |
3536 return false; |
|
3537 } |
|
3538 |
|
3539 oop java_lang_ClassLoader::non_reflection_class_loader(oop loader) { |
|
3540 // See whether this is one of the class loaders associated with |
|
3541 // the generated bytecodes for reflection, and if so, "magically" |
|
3542 // delegate to its parent to prevent class loading from occurring |
|
3543 // in places where applications using reflection didn't expect it. |
|
3544 if (is_reflection_class_loader(loader)) { |
|
3545 return parent(loader); |
3539 } |
3546 } |
3540 return loader; |
3547 return loader; |
3541 } |
3548 } |
3542 |
3549 |
3543 oop java_lang_ClassLoader::unnamedModule(oop loader) { |
3550 oop java_lang_ClassLoader::unnamedModule(oop loader) { |