--- old/src/hotspot/share/classfile/systemDictionary.cpp 2018-04-10 16:58:49.768142000 +0200 +++ new/src/hotspot/share/classfile/systemDictionary.cpp 2018-04-10 16:58:49.321073000 +0200 @@ -2170,7 +2170,6 @@ if ((defining == true) || (k != check)) { linkage_error1 = "loader "; linkage_error2 = " attempted duplicate class definition for "; - guarantee(check->class_loader() == class_loader(), "Per construction. Else report the other loader."); } else { return; } @@ -3107,18 +3106,10 @@ NOT_PRODUCT(SystemDictionary::verify()); } -// Return string to give helpful intformation about a classloader. // Caller needs ResourceMark. const char* SystemDictionary::loader_name(const oop loader) { -#if INCLUDE_CDS - if (DumpSharedSpaces) { - // Describe_external() calls assert(is_instance...) in various places, - // which may fail with DumpSharedSpaces. - if ((loader) == NULL) return ""; - return InstanceKlass::cast((loader)->klass())->name()->as_C_string(); - } -#endif - return java_lang_ClassLoader::describe_external(loader); + return ((loader) == NULL ? "" : + InstanceKlass::cast((loader)->klass())->name()->as_C_string()); } // caller needs ResourceMark