hotspot Cdiff src/share/vm/classfile/systemDictionary.cpp (original) (raw)
src/share/vm/classfile/systemDictionary.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File hotspot Cdiff src/share/vm/classfile/systemDictionary.cpp Print this page
*** 167,177 ****
*/
bool SystemDictionary::is_ext_class_loader(Handle class_loader) {
if (class_loader.is_null()) {
return false;
}
! return (class_loader->klass()->name() == vmSymbols::sun_misc_Launcher_ExtClassLoader());
}
// ----------------------------------------------------------------------------
// Resolving of classes
--- 167,177 ----
*/
bool SystemDictionary::is_ext_class_loader(Handle class_loader) {
if (class_loader.is_null()) {
return false;
}
! return (class_loader->klass()->name()->equals(vmSymbols::sun_misc_Launcher_ExtClassLoader()));
}
// ----------------------------------------------------------------------------
// Resolving of classes
*** 354,364 **** // so we don't throw an exception here. // see: nsk redefclass014 & java.lang.instrument Instrument032 if ((childk != NULL ) && (is_superclass) && ((quicksuperk = InstanceKlass::cast(childk)->super()) != NULL) &&
! ((quicksuperk->name() == class_name) && (quicksuperk->class_loader() == class_loader()))) { return quicksuperk; } else { PlaceholderEntry* probe = placeholders()->get_entry(p_index, p_hash, child_name, loader_data); if (probe && probe->check_seen_thread(THREAD, PlaceholderTable::LOAD_SUPER)) { --- 354,364 ---- // so we don't throw an exception here. // see: nsk redefclass014 & java.lang.instrument Instrument032 if ((childk != NULL ) && (is_superclass) && ((quicksuperk = InstanceKlass::cast(childk)->super()) != NULL) &&
! ((quicksuperk->name()->equals(class_name)) && (quicksuperk->class_loader() == class_loader()))) { return quicksuperk; } else { PlaceholderEntry* probe = placeholders()->get_entry(p_index, p_hash, child_name, loader_data); if (probe && probe->check_seen_thread(THREAD, PlaceholderTable::LOAD_SUPER)) {
*** 1104,1115 ****
Exceptions::_throw_msg(THREAD_AND_LOCATION,
vmSymbols::java_lang_SecurityException(), message);
}
if (!HAS_PENDING_EXCEPTION) {
! assert(parsed_name != NULL, "Sanity");
! assert(class_name == NULL || class_name == parsed_name, "name mismatch");
// Verification prevents us from creating names with dots in them, this
// asserts that that's the case.
assert(is_internal_format(parsed_name),
"external class name format used internally");
--- 1104,1115 ----
Exceptions::_throw_msg(THREAD_AND_LOCATION,
vmSymbols::java_lang_SecurityException(), message);
}
if (!HAS_PENDING_EXCEPTION) {
! assert(parsed_name->not_equals(NULL), "Sanity");
! assert(class_name == NULL || class_name->equals(parsed_name), "name mismatch");
// Verification prevents us from creating names with dots in them, this
// asserts that that's the case.
assert(is_internal_format(parsed_name),
"external class name format used internally");
*** 1352,1362 **** instanceKlassHandle k = instanceKlassHandle(THREAD, java_lang_Class::as_Klass(obj)); // For user defined Java class loaders, check that the name returned is // the same as that requested. This check is done for the bootstrap // loader when parsing the class file. ! if (class_name == k->name()) { return k; } } // Class is not found or has the wrong name, return NULL return nh; --- 1352,1362 ---- instanceKlassHandle k = instanceKlassHandle(THREAD, java_lang_Class::as_Klass(obj)); // For user defined Java class loaders, check that the name returned is // the same as that requested. This check is done for the bootstrap // loader when parsing the class file. ! if (class_name->equals(k->name())) { return k; } } // Class is not found or has the wrong name, return NULL return nh;
*** 1987,1997 **** } }
#ifdef ASSERT Symbol* ph_check = find_placeholder(name, loader_data); ! assert(ph_check == NULL || ph_check == name, "invalid symbol"); #endif
if (linkage_error == NULL) {
if (constraints()->check_or_update(k, class_loader, name) == false) {
linkage_error = "loader constraint violation: loader (instance of %s)"
--- 1987,1997 ---- } }
#ifdef ASSERT Symbol* ph_check = find_placeholder(name, loader_data); ! assert(ph_check == NULL || ph_check->equals(name), "invalid symbol"); #endif
if (linkage_error == NULL) {
if (constraints()->check_or_update(k, class_loader, name) == false) {
linkage_error = "loader constraint violation: loader (instance of %s)"
src/share/vm/classfile/systemDictionary.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File