1.1 --- a/src/share/classes/com/sun/tools/javac/util/Log.java Fri Jun 11 07:12:07 2010 -0700 1.2 +++ b/src/share/classes/com/sun/tools/javac/util/Log.java Fri Jun 11 17:24:23 2010 -0700 1.3 @@ -125,8 +125,8 @@ 1.4 this.promptOnError = options.get("-prompt") != null; 1.5 this.emitWarnings = options.get("-Xlint:none") == null; 1.6 this.suppressNotes = options.get("suppressNotes") != null; 1.7 - this.MaxErrors = getIntOption(options, "-Xmaxerrs", 100); 1.8 - this.MaxWarnings = getIntOption(options, "-Xmaxwarns", 100); 1.9 + this.MaxErrors = getIntOption(options, "-Xmaxerrs", getDefaultMaxErrors()); 1.10 + this.MaxWarnings = getIntOption(options, "-Xmaxwarns", getDefaultMaxWarnings()); 1.11 1.12 boolean rawDiagnostics = options.get("rawDiagnostics") != null; 1.13 messages = JavacMessages.instance(context); 1.14 @@ -155,6 +155,18 @@ 1.15 return defaultValue; 1.16 } 1.17 1.18 + /** Default value for -Xmaxerrs. 1.19 + */ 1.20 + protected int getDefaultMaxErrors() { 1.21 + return 100; 1.22 + } 1.23 + 1.24 + /** Default value for -Xmaxwarns. 1.25 + */ 1.26 + protected int getDefaultMaxWarnings() { 1.27 + return 100; 1.28 + } 1.29 + 1.30 /** The default writer for diagnostics 1.31 */ 1.32 static final PrintWriter defaultWriter(Context context) {