langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java
changeset 8242 3873b4aaf4a8
parent 8239 d2c934e951e2
child 8431 21758b2bba40
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java	Mon Feb 07 18:09:46 2011 +0000
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java	Mon Feb 07 18:10:13 2011 +0000
@@ -709,7 +709,11 @@
 
             // If we override any other methods, check that we do so properly.
             // JLS ???
-            chk.checkClashes(tree.pos(), env.enclClass.type, m);
+            if (m.isStatic()) {
+                chk.checkHideClashes(tree.pos(), env.enclClass.type, m);
+            } else {
+                chk.checkOverrideClashes(tree.pos(), env.enclClass.type, m);
+            }
             chk.checkOverride(tree, m);
 
             // Create a new environment with local scope