1.1 --- a/src/share/classes/com/sun/tools/javac/util/Log.java Wed Aug 19 17:12:36 2009 -0700 1.2 +++ b/src/share/classes/com/sun/tools/javac/util/Log.java Fri Aug 21 11:25:45 2009 -0700 1.3 @@ -78,6 +78,10 @@ 1.4 */ 1.5 public boolean emitWarnings; 1.6 1.7 + /** Switch: suppress note messages. 1.8 + */ 1.9 + public boolean suppressNotes; 1.10 + 1.11 /** Print stack trace on errors? 1.12 */ 1.13 public boolean dumpOnError; 1.14 @@ -121,6 +125,7 @@ 1.15 this.dumpOnError = options.get("-doe") != null; 1.16 this.promptOnError = options.get("-prompt") != null; 1.17 this.emitWarnings = options.get("-Xlint:none") == null; 1.18 + this.suppressNotes = options.get("suppressNotes") != null; 1.19 this.MaxErrors = getIntOption(options, "-Xmaxerrs", 100); 1.20 this.MaxWarnings = getIntOption(options, "-Xmaxwarns", 100); 1.21 1.22 @@ -324,7 +329,7 @@ 1.23 // Print out notes only when we are permitted to report warnings 1.24 // Notes are only generated at the end of a compilation, so should be small 1.25 // in number. 1.26 - if (emitWarnings || diagnostic.isMandatory()) { 1.27 + if ((emitWarnings || diagnostic.isMandatory()) && !suppressNotes) { 1.28 writeDiagnostic(diagnostic); 1.29 } 1.30 break;