8203400: Fix issue with "8199852: Print more information about class loaders in LinkageErrors."

Reviewed-by: dholmes, lfoltan
This commit is contained in:
Goetz Lindenmaier 2018-05-18 10:59:04 +02:00
parent a455811dca
commit 87ca9d07df
2 changed files with 4 additions and 10 deletions

View file

@ -4134,9 +4134,9 @@ const char* java_lang_ClassLoader::describe_external(const oop loader) {
oop parentNameOop = java_lang_ClassLoader::name(pl);
if (parentNameOop != NULL) {
parentName = java_lang_String::as_utf8_string(parentNameOop);
if (parentName == NULL) {
parentName = "<unnamed>";
}
}
if (parentName == NULL) {
parentName = "<unnamed>";
}
ss.print(", child of \"%s\" %s", parentName, pl->klass()->external_name());
} else {