langtools/src/share/classes/com/sun/tools/javac/util/Log.java
changeset 3660 ee583c342a41
parent 2212 1d3dc0e0ba0c
child 3995 73af8b6fb8bc
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Log.java	Wed Aug 19 17:12:36 2009 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Log.java	Fri Aug 21 11:25:45 2009 -0700
@@ -78,6 +78,10 @@
      */
     public boolean emitWarnings;
 
+    /** Switch: suppress note messages.
+     */
+    public boolean suppressNotes;
+
     /** Print stack trace on errors?
      */
     public boolean dumpOnError;
@@ -121,6 +125,7 @@
         this.dumpOnError = options.get("-doe") != null;
         this.promptOnError = options.get("-prompt") != null;
         this.emitWarnings = options.get("-Xlint:none") == null;
+        this.suppressNotes = options.get("suppressNotes") != null;
         this.MaxErrors = getIntOption(options, "-Xmaxerrs", 100);
         this.MaxWarnings = getIntOption(options, "-Xmaxwarns", 100);
 
@@ -324,7 +329,7 @@
             // Print out notes only when we are permitted to report warnings
             // Notes are only generated at the end of a compilation, so should be small
             // in number.
-            if (emitWarnings || diagnostic.isMandatory()) {
+            if ((emitWarnings || diagnostic.isMandatory()) && !suppressNotes) {
                 writeDiagnostic(diagnostic);
             }
             break;