changeset 15872:b7fc7cdb9005

HotSpotOptions error messages should go to System.err
author Doug Simon <doug.simon@oracle.com>
date Sat, 24 May 2014 00:25:29 +0200
parents 11bf5b8973c9
children 6dcf8ab4ad86
files graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotOptions.java
diffstat 1 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotOptions.java	Sat May 24 00:23:52 2014 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotOptions.java	Sat May 24 00:25:29 2014 +0200
@@ -155,12 +155,12 @@
 
         if (value == null) {
             if (optionType == Boolean.TYPE || optionType == Boolean.class) {
-                System.out.println("Value for boolean option '" + optionName + "' must use '-G:+" + optionName + "' or '-G:-" + optionName + "' format");
+                System.err.println("Value for boolean option '" + optionName + "' must use '-G:+" + optionName + "' or '-G:-" + optionName + "' format");
                 return false;
             }
 
             if (valueString == null) {
-                System.out.println("Value for option '" + optionName + "' must use '-G:" + optionName + "=<value>' format");
+                System.err.println("Value for option '" + optionName + "' must use '-G:" + optionName + "=<value>' format");
                 return false;
             }
 
@@ -175,7 +175,7 @@
             }
         } else {
             if (optionType != Boolean.class) {
-                System.out.println("Value for option '" + optionName + "' must use '-G:" + optionName + "=<value>' format");
+                System.err.println("Value for option '" + optionName + "' must use '-G:" + optionName + "=<value>' format");
                 return false;
             }
         }
@@ -186,10 +186,10 @@
             } else {
                 OptionValue<?> optionValue = desc.getOptionValue();
                 optionValue.setValue(value);
-                // System.out.println("Set option " + desc.getName() + " to " + value);
+                // System.err.println("Set option " + desc.getName() + " to " + value);
             }
         } else {
-            System.out.println("Wrong value \"" + valueString + "\" for option " + optionName);
+            System.err.println("Wrong value \"" + valueString + "\" for option " + optionName);
             return false;
         }
 
@@ -197,13 +197,13 @@
     }
 
     protected static void printNoMatchMessage(String optionName) {
-        System.out.println("Could not find option " + optionName + " (use -G:+PrintFlags to see Graal options)");
+        System.err.println("Could not find option " + optionName + " (use -G:+PrintFlags to see Graal options)");
         List<OptionDescriptor> matches = fuzzyMatch(optionName);
         if (!matches.isEmpty()) {
-            System.out.println("Did you mean one of the following?");
+            System.err.println("Did you mean one of the following?");
             for (OptionDescriptor match : matches) {
                 boolean isBoolean = match.getType() == boolean.class;
-                System.out.println(String.format("    %s%s%s", isBoolean ? "(+/-)" : "", match.getName(), isBoolean ? "" : "=<value>"));
+                System.err.println(String.format("    %s%s%s", isBoolean ? "(+/-)" : "", match.getName(), isBoolean ? "" : "=<value>"));
             }
         }
     }
@@ -230,7 +230,7 @@
             }
             String previous = System.setProperty(propertyName, "true");
             if (previous != null) {
-                System.out.println("Overrode value \"" + previous + "\" of system property \"" + propertyName + "\" with \"true\"");
+                System.err.println("Overrode value \"" + previous + "\" of system property \"" + propertyName + "\" with \"true\"");
             }
         } catch (Exception e) {
             throw new GraalInternalError(e);