src/hotspot/share/oops/klass.cpp
changeset 50569 60d66a249db6
parent 50532 a18c60527166
child 50601 3fbae7b9ddb5
--- a/src/hotspot/share/oops/klass.cpp	Thu Jun 14 05:50:21 2018 -0700
+++ b/src/hotspot/share/oops/klass.cpp	Thu Jun 14 10:33:54 2018 -0400
@@ -809,10 +809,10 @@
       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 {