--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java Wed May 15 14:00:31 2013 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java Wed May 15 14:02:37 2013 +0100
@@ -1361,23 +1361,23 @@
for (List<? extends JCTree> l = trees; l.nonEmpty(); l = l.tail)
validateTree(l.head, checkRaw, isOuter);
}
-
- void checkRaw(JCTree tree, Env<AttrContext> env) {
- if (lint.isEnabled(LintCategory.RAW) &&
- tree.type.hasTag(CLASS) &&
- !TreeInfo.isDiamond(tree) &&
- !withinAnonConstr(env) &&
- tree.type.isRaw()) {
- log.warning(LintCategory.RAW,
- tree.pos(), "raw.class.use", tree.type, tree.type.tsym.type);
- }
+ }
+
+ void checkRaw(JCTree tree, Env<AttrContext> env) {
+ if (lint.isEnabled(LintCategory.RAW) &&
+ tree.type.hasTag(CLASS) &&
+ !TreeInfo.isDiamond(tree) &&
+ !withinAnonConstr(env) &&
+ tree.type.isRaw()) {
+ log.warning(LintCategory.RAW,
+ tree.pos(), "raw.class.use", tree.type, tree.type.tsym.type);
}
-
- boolean withinAnonConstr(Env<AttrContext> env) {
+ }
+ //where
+ private boolean withinAnonConstr(Env<AttrContext> env) {
return env.enclClass.name.isEmpty() &&
env.enclMethod != null && env.enclMethod.name == names.init;
}
- }
/* *************************************************************************
* Exception checking