--- 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