langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java
changeset 17583 91949b5f7651
parent 17582 4079713129dd
child 17584 3c4dfe34c2ec
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java	Wed May 15 14:00:31 2013 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java	Wed May 15 14:02:37 2013 +0100
@@ -2642,10 +2642,11 @@
                 return;
             }
 
-            if (TreeInfo.isStaticSelector(that.expr, names) &&
-                    (that.getMode() != ReferenceMode.NEW || !that.expr.type.isRaw())) {
-                //if the qualifier is a type, validate it
-                chk.validate(that.expr, env);
+            if (TreeInfo.isStaticSelector(that.expr, names)) {
+                //if the qualifier is a type, validate it; raw warning check is
+                //omitted as we don't know at this stage as to whether this is a
+                //raw selector (because of inference)
+                chk.validate(that.expr, env, false);
             }
 
             //attrib type-arguments
@@ -2731,6 +2732,13 @@
 
             if (resultInfo.checkContext.deferredAttrContext().mode == AttrMode.CHECK) {
 
+                if (that.getMode() == ReferenceMode.INVOKE &&
+                        TreeInfo.isStaticSelector(that.expr, names) &&
+                        that.kind.isUnbound() &&
+                        !desc.getParameterTypes().head.isParameterized()) {
+                    chk.checkRaw(that.expr, localEnv);
+                }
+
                 if (!that.kind.isUnbound() &&
                         that.getMode() == ReferenceMode.INVOKE &&
                         TreeInfo.isStaticSelector(that.expr, names) &&