### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core.tests.compiler Index: src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java,v retrieving revision 1.84 diff -u -r1.84 MethodVerifyTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java 21 Apr 2006 22:11:46 -0000 1.84 +++ src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java 16 May 2006 06:57:16 -0000 @@ -348,7 +348,8 @@ null ); } - + //https://bugs.eclipse.org/bugs/show_bug.cgi?id=141931 may change this + // if we decide to mandate the @Override upon K#foo public void test004() { // all together this.runNegativeTest( new String[] { Index: src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java,v retrieving revision 1.151 diff -u -r1.151 AnnotationTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java 11 May 2006 14:22:30 -0000 1.151 +++ src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java 16 May 2006 06:57:12 -0000 @@ -2436,6 +2436,8 @@ "----------\n"); } // check @Override annotation - strictly for superclasses (overrides) and not interfaces (implements) + //https://bugs.eclipse.org/bugs/show_bug.cgi?id=141931 will change this by + // suppressing the last message (note also that the message label should change). public void test077() { this.runNegativeTest( new String[] { @@ -3971,6 +3973,8 @@ ""); } //https://bugs.eclipse.org/bugs/show_bug.cgi?id=90484 - check no missing @Override warning + //https://bugs.eclipse.org/bugs/show_bug.cgi?id=141931 will change this + // since X#clone() is override-compatible with Object#clone. public void test126() { this.runNegativeTest( new String[] { @@ -5605,6 +5609,9 @@ "----------\n"); } //https://bugs.eclipse.org/bugs/show_bug.cgi?id=94759 + //https://bugs.eclipse.org/bugs/show_bug.cgi?id=141931 + // will probably change this (the new ref impl should + // add @Override capability to interfaces - so no error here) public void test168() { this.runNegativeTest( new String[] { @@ -6565,4 +6572,25 @@ }, ""); } +//https://bugs.eclipse.org/bugs/show_bug.cgi?id=141931 +// still have to decide if we mandate the @Override when a class +// implements an interface method; however, the reference impl +// may (as of 20060516) consider tolerating it +public void _test200() { + this.runConformTest( + new String[] { + "I.java", + "public interface I {\n" + + " void foo();\n" + + "}\n", + "X.java", + "class X implements I {\n" + + " @Override\n" + + " public void foo() {}\n" + + "}\n", + }, + ""); +} + + } Index: src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_5.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_5.java,v retrieving revision 1.54 diff -u -r1.54 Compliance_1_5.java --- src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_5.java 11 May 2006 10:23:00 -0000 1.54 +++ src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_5.java 16 May 2006 06:57:14 -0000 @@ -1683,6 +1683,11 @@ * http://bugs.eclipse.org/bugs/show_bug.cgi?id=39467 * should diagnose missing abstract method implementation */ +//https://bugs.eclipse.org/bugs/show_bug.cgi?id=141931 will +// change this +// we should be tolerant to T#foo should bearing an @Override +// annotation since it implements I#foo; however, mandating it +// is probably too much... public void test046() { this.runNegativeTest( new String[] {