### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java,v retrieving revision 1.401 diff -u -r1.401 Parser.java --- compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java 31 Mar 2009 14:17:29 -0000 1.401 +++ compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java 6 May 2009 00:22:32 -0000 @@ -1357,6 +1357,10 @@ typeDecl.declarationSourceEnd = flushCommentsDefinedPriorTo(this.endStatementPosition); } protected void consumeAnnotationTypeDeclarationHeader() { + TypeDeclaration annotationTypeDeclaration = (TypeDeclaration) this.astStack[this.astPtr]; + if (this.currentToken == TokenNameLBRACE) { + annotationTypeDeclaration.bodyStart = this.scanner.currentPosition; + } if (this.currentElement != null) { this.restartRecovery = true; // used to avoid branching back into the regular automaton } #P org.eclipse.jdt.core.tests.compiler 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.197 diff -u -r1.197 AnnotationTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java 28 Apr 2009 17:17:35 -0000 1.197 +++ src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java 6 May 2009 00:22:36 -0000 @@ -44,7 +44,7 @@ // All specified tests which do not belong to the class are skipped... static { // TESTS_NAMES = new String[] { "test127" }; -// TESTS_NUMBERS = new int[] { 249 }; +// TESTS_NUMBERS = new int[] { 269 }; // TESTS_RANGE = new int[] { 249, -1 }; } @@ -8826,4 +8826,28 @@ "The value for annotation attribute X.Anno2.value must be an enum constant expression\n" + "----------\n"); } +// https://bugs.eclipse.org/bugs/show_bug.cgi?id=274917 +public void test269() { + Map customOptions = new Hashtable(); + String[] warnings = CompilerOptions.warningOptionNames(); + for (int i = 0, ceil = warnings.length; i < ceil; i++) { + customOptions.put(warnings[i], CompilerOptions.WARNING); + } + this.runConformTest( + true, + new String[] { + "X.java", + "@interface X {}", + }, + null, + customOptions, + "----------\n" + + "1. WARNING in X.java (at line 1)\n" + + " @interface X {}\n" + + " ^^\n" + + "Empty block should be documented\n" + + "----------\n", + null, null, + JavacTestOptions.Excuse.EclipseHasSomeMoreWarnings); +} }