8215165: Improve -Xlog:class+preview message text
authorhseigel
Tue, 11 Dec 2018 10:29:08 -0500
changeset 52945 de85ab85fbc7
parent 52944 d75110673dc9
child 52946 752e57845ad2
8215165: Improve -Xlog:class+preview message text Summary: Fix up the logging message. Reviewed-by: acorn, lfoltan
src/hotspot/share/classfile/classFileParser.cpp
test/hotspot/jtreg/runtime/ClassFile/PreviewVersion.java
--- a/src/hotspot/share/classfile/classFileParser.cpp	Tue Dec 11 15:09:15 2018 +0000
+++ b/src/hotspot/share/classfile/classFileParser.cpp	Tue Dec 11 10:29:08 2018 -0500
@@ -5733,7 +5733,8 @@
         ik->major_version() != JAVA_MIN_SUPPORTED_VERSION &&
         log_is_enabled(Info, class, preview)) {
       ResourceMark rm;
-      log_info(class, preview)("Loading preview feature type %s", ik->external_name());
+      log_info(class, preview)("Loading class %s that depends on preview features (class file version %d.65535)",
+                               ik->external_name(), ik->major_version());
     }
 
     if (log_is_enabled(Debug, class, resolve))  {
--- a/test/hotspot/jtreg/runtime/ClassFile/PreviewVersion.java	Tue Dec 11 15:09:15 2018 +0000
+++ b/test/hotspot/jtreg/runtime/ClassFile/PreviewVersion.java	Tue Dec 11 10:29:08 2018 -0500
@@ -69,7 +69,7 @@
         pb = ProcessTools.createJavaProcessBuilder("--enable-preview", "-Xlog:class+preview",
             "-cp", "." + File.pathSeparator + System.getProperty("test.classes"), "PVTest");
         oa = new OutputAnalyzer(pb.start());
-        oa.shouldContain("[info][class,preview] Loading preview feature type PVTest");
+        oa.shouldContain("[info][class,preview] Loading class PVTest that depends on preview features");
 
         // Subtract 1 from class's major version.  The class should fail to load
         // because its major_version does not match the JVM current version.