< prev index next >
src/hotspot/share/oops/klass.cpp
Print this page
@@ -807,14 +807,14 @@
if (module->is_named()) {
has_mod_name = true;
module_name = module->name()->as_C_string();
msglen += strlen(module_name);
// Use version if exists and is not a jdk module
- if (module->is_non_jdk_module() && module->version() != NULL) {
+ if (module->should_show_version()) {
has_version = true;
version = module->version()->as_C_string();
- msglen += strlen("@") + strlen(version);
+ msglen += strlen(version) + 1; // +1 for "@"
}
}
} else {
// klass is an array of primitives, so its module is java.base
module_name = JAVA_BASE_NAME;
< prev index next >