### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: compiler/org/eclipse/jdt/internal/compiler/ClassFile.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java,v retrieving revision 1.201 diff -u -r1.201 ClassFile.java --- compiler/org/eclipse/jdt/internal/compiler/ClassFile.java 20 Jul 2010 20:23:19 -0000 1.201 +++ compiler/org/eclipse/jdt/internal/compiler/ClassFile.java 26 Jul 2010 18:47:29 -0000 @@ -3856,6 +3856,8 @@ } if (aType.isAnonymousType()) { accessFlags &= ~ClassFileConstants.AccFinal; + } else if ((accessFlags & (ClassFileConstants.AccFinal | ClassFileConstants.AccAbstract)) == (ClassFileConstants.AccFinal | ClassFileConstants.AccAbstract)) { + accessFlags &= ~ClassFileConstants.AccFinal; } this.enclosingClassFile = parentClassFile; // innerclasses get their names computed at code gen time #P org.eclipse.jdt.core.tests.compiler Index: src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java,v retrieving revision 1.28 diff -u -r1.28 ProblemTypeAndMethodTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java 18 Mar 2010 16:22:35 -0000 1.28 +++ src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java 26 Jul 2010 18:47:29 -0000 @@ -31,7 +31,7 @@ // All specified tests which does not belong to the class are skipped... static { // TESTS_NAMES = new String[] { "test127" }; -// TESTS_NUMBERS = new int[] { 104 }; +// TESTS_NUMBERS = new int[] { 107 }; // TESTS_RANGE = new int[] { 169, 180 }; } @@ -5339,4 +5339,50 @@ "Listener cannot be resolved to a type\n" + "----------\n"); } +//https://bugs.eclipse.org/bugs/show_bug.cgi?id=319425 +public void test107() { + this.runNegativeTest( + new String[] { + "p/OuterBogus.java", //----------------------------------------------------------------------- + "package p;\n" + + "abstract final class OuterBogus {\n" + + " public static void call() {\n" + + " System.out.println(\"Hi. I'm outer bogus.\");\n" + + " }\n" + + "}", + }, + "----------\n" + + "1. ERROR in p\\OuterBogus.java (at line 2)\n" + + " abstract final class OuterBogus {\n" + + " ^^^^^^^^^^\n" + + "The class OuterBogus can be either abstract or final, not both\n" + + "----------\n", + null /* no extra class libraries */, + true /* flush output directory */, + null /* no custom options */, + true /* do not generate output */, + false /* do not show category */, + false /* do not show warning token */, + false /* do not skip javac for this peculiar test */, + false /* do not perform statements recovery */); + this.runConformTest( + new String[] { + "p/Bogus.java", //----------------------------------------------------------------------- + "package p;\n" + + "\n" + + "public class Bogus {\n" + + " public static void main(String[] args) {\n" + + " try {\n" + + " OuterBogus.call();\n" + + " } catch(Error e) {\n" + + " System.out.println(\"Compilation error found\");\n" + + " }\n" + + " }\n" + + "}", + }, + "Compilation error found", + null, + false, + null); +} }