1.1 --- a/src/share/classes/com/sun/tools/javac/comp/Check.java Mon Jul 26 14:18:45 2010 -0700 1.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Check.java Mon Jul 26 14:25:56 2010 -0700 1.3 @@ -111,13 +111,13 @@ 1.4 boolean enforceMandatoryWarnings = source.enforceMandatoryWarnings(); 1.5 1.6 deprecationHandler = new MandatoryWarningHandler(log, verboseDeprecated, 1.7 - enforceMandatoryWarnings, "deprecated"); 1.8 + enforceMandatoryWarnings, "deprecated", LintCategory.DEPRECATION); 1.9 uncheckedHandler = new MandatoryWarningHandler(log, verboseUnchecked, 1.10 - enforceMandatoryWarnings, "unchecked"); 1.11 + enforceMandatoryWarnings, "unchecked", LintCategory.UNCHECKED); 1.12 unsafeVarargsHandler = new MandatoryWarningHandler(log, verboseVarargs, 1.13 - enforceMandatoryWarnings, "varargs"); 1.14 + enforceMandatoryWarnings, "varargs", LintCategory.VARARGS); 1.15 sunApiHandler = new MandatoryWarningHandler(log, verboseSunApi, 1.16 - enforceMandatoryWarnings, "sunapi"); 1.17 + enforceMandatoryWarnings, "sunapi", null); 1.18 } 1.19 1.20 /** Switch: generics enabled? 1.21 @@ -209,7 +209,7 @@ 1.22 1.23 public void warnStatic(DiagnosticPosition pos, String msg, Object... args) { 1.24 if (lint.isEnabled(LintCategory.STATIC)) 1.25 - log.warning(pos, msg, args); 1.26 + log.warning(LintCategory.STATIC, pos, msg, args); 1.27 } 1.28 1.29 /** 1.30 @@ -929,7 +929,8 @@ 1.31 !TreeInfo.isDiamond(tree) && 1.32 !env.enclClass.name.isEmpty() && //anonymous or intersection 1.33 tree.type.isRaw()) { 1.34 - log.warning(tree.pos(), "raw.class.use", tree.type, tree.type.tsym.type); 1.35 + log.warning(Lint.LintCategory.RAW, 1.36 + tree.pos(), "raw.class.use", tree.type, tree.type.tsym.type); 1.37 } 1.38 } 1.39 1.40 @@ -2156,7 +2157,8 @@ 1.41 (s.flags() & DEPRECATED) != 0 && 1.42 !syms.deprecatedType.isErroneous() && 1.43 s.attribute(syms.deprecatedType.tsym) == null) { 1.44 - log.warning(pos, "missing.deprecated.annotation"); 1.45 + log.warning(Lint.LintCategory.DEP_ANN, 1.46 + pos, "missing.deprecated.annotation"); 1.47 } 1.48 } 1.49 1.50 @@ -2307,7 +2309,7 @@ 1.51 int opc = ((OperatorSymbol)operator).opcode; 1.52 if (opc == ByteCodes.idiv || opc == ByteCodes.imod 1.53 || opc == ByteCodes.ldiv || opc == ByteCodes.lmod) { 1.54 - log.warning(pos, "div.zero"); 1.55 + log.warning(Lint.LintCategory.DIVZERO, pos, "div.zero"); 1.56 } 1.57 } 1.58 } 1.59 @@ -2317,7 +2319,7 @@ 1.60 */ 1.61 void checkEmptyIf(JCIf tree) { 1.62 if (tree.thenpart.getTag() == JCTree.SKIP && tree.elsepart == null && lint.isEnabled(Lint.LintCategory.EMPTY)) 1.63 - log.warning(tree.thenpart.pos(), "empty.if"); 1.64 + log.warning(Lint.LintCategory.EMPTY, tree.thenpart.pos(), "empty.if"); 1.65 } 1.66 1.67 /** Check that symbol is unique in given scope.