diff -r 04edd7910585 -r 6f095ff5b469 langtools/src/share/classes/com/sun/tools/javac/util/Log.java --- a/langtools/src/share/classes/com/sun/tools/javac/util/Log.java Fri Jun 11 07:12:07 2010 -0700 +++ b/langtools/src/share/classes/com/sun/tools/javac/util/Log.java Fri Jun 11 17:24:23 2010 -0700 @@ -125,8 +125,8 @@ 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); + this.MaxErrors = getIntOption(options, "-Xmaxerrs", getDefaultMaxErrors()); + this.MaxWarnings = getIntOption(options, "-Xmaxwarns", getDefaultMaxWarnings()); boolean rawDiagnostics = options.get("rawDiagnostics") != null; messages = JavacMessages.instance(context); @@ -155,6 +155,18 @@ return defaultValue; } + /** Default value for -Xmaxerrs. + */ + protected int getDefaultMaxErrors() { + return 100; + } + + /** Default value for -Xmaxwarns. + */ + protected int getDefaultMaxWarnings() { + return 100; + } + /** The default writer for diagnostics */ static final PrintWriter defaultWriter(Context context) {