8203919: Remove "-add-modules" hint from error message
authoregahlin
Mon, 04 Jun 2018 22:03:10 +0200
changeset 50388 55fac6146d31
parent 50387 3b52a76c7902
child 50389 7e8c0409a747
8203919: Remove "-add-modules" hint from error message Reviewed-by: mgronlun
src/hotspot/share/jfr/jni/jfrJavaSupport.cpp
test/jdk/jdk/jfr/jvm/TestJfrJavaBase.java
--- a/src/hotspot/share/jfr/jni/jfrJavaSupport.cpp	Mon Jun 04 13:53:51 2018 -0500
+++ b/src/hotspot/share/jfr/jni/jfrJavaSupport.cpp	Mon Jun 04 22:03:10 2018 +0200
@@ -584,10 +584,8 @@
 
 static void print_module_resolution_error(outputStream* stream) {
   assert(stream != NULL, "invariant");
-  stream->print_cr("%s not found.", JDK_JFR_MODULE_NAME);
+  stream->print_cr("Module %s not found.", JDK_JFR_MODULE_NAME);
   stream->print_cr("Flight Recorder can not be enabled.");
-  stream->print_cr("To use Flight Recorder, you might need to add" \
-    " \"--add-modules %s\" to the VM command-line options.", JDK_JFR_MODULE_NAME);
 }
 
 bool JfrJavaSupport::is_jdk_jfr_module_available() {
--- a/test/jdk/jdk/jfr/jvm/TestJfrJavaBase.java	Mon Jun 04 13:53:51 2018 -0500
+++ b/test/jdk/jdk/jfr/jvm/TestJfrJavaBase.java	Mon Jun 04 22:03:10 2018 +0200
@@ -43,9 +43,8 @@
 public class TestJfrJavaBase {
 
     private static void checkOutput(OutputAnalyzer output) {
-        output.shouldContain("jdk.jfr not found.");
+        output.shouldContain("Module jdk.jfr not found.");
         output.shouldContain("Flight Recorder can not be enabled.");
-        output.shouldContain("To use Flight Recorder, you might need to add \"--add-modules jdk.jfr\" to the VM command-line options.");
     }
 
     public static void main(String[] args) throws Exception {