8165550: Add class loader names to ClassCastException message

Adds new format of class loader names to VM ClassCastException messages

Reviewed-by: dholmes, mchung, lfoltan
This commit is contained in:
Rachel Protacio 2016-11-17 16:28:45 -05:00
parent 81f1e7056b
commit 3f2be39bb3
6 changed files with 253 additions and 39 deletions

View file

@ -54,6 +54,17 @@ void ModuleEntry::set_location(Symbol* location) {
}
}
bool ModuleEntry::is_non_jdk_module() {
ResourceMark rm;
if (location() != NULL) {
const char* loc = location()->as_C_string();
if (strncmp(loc, "jrt:/java.", 10) != 0 && strncmp(loc, "jrt:/jdk.", 9) != 0) {
return true;
}
}
return false;
}
void ModuleEntry::set_version(Symbol* version) {
if (_version != NULL) {
// _version symbol's refcounts are managed by ModuleEntry,