View | Details | Raw Unified | Return to bug 274917 | Differences between
and this patch

Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java (+4 lines)
Lines 1357-1362 Link Here
1357
	typeDecl.declarationSourceEnd = flushCommentsDefinedPriorTo(this.endStatementPosition);
1357
	typeDecl.declarationSourceEnd = flushCommentsDefinedPriorTo(this.endStatementPosition);
1358
}
1358
}
1359
protected void consumeAnnotationTypeDeclarationHeader() {
1359
protected void consumeAnnotationTypeDeclarationHeader() {
1360
	TypeDeclaration annotationTypeDeclaration = (TypeDeclaration) this.astStack[this.astPtr];
1361
	if (this.currentToken == TokenNameLBRACE) {
1362
		annotationTypeDeclaration.bodyStart = this.scanner.currentPosition;
1363
	}
1360
	if (this.currentElement != null) {
1364
	if (this.currentElement != null) {
1361
		this.restartRecovery = true; // used to avoid branching back into the regular automaton
1365
		this.restartRecovery = true; // used to avoid branching back into the regular automaton
1362
	}
1366
	}
(-)src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java (-1 / +25 lines)
Lines 44-50 Link Here
44
	// All specified tests which do not belong to the class are skipped...
44
	// All specified tests which do not belong to the class are skipped...
45
	static {
45
	static {
46
//		TESTS_NAMES = new String[] { "test127" };
46
//		TESTS_NAMES = new String[] { "test127" };
47
//		TESTS_NUMBERS = new int[] { 249 };
47
//		TESTS_NUMBERS = new int[] { 269 };
48
//		TESTS_RANGE = new int[] { 249, -1 };
48
//		TESTS_RANGE = new int[] { 249, -1 };
49
	}
49
	}
50
50
Lines 8826-8829 Link Here
8826
		"The value for annotation attribute X.Anno2.value must be an enum constant expression\n" + 
8826
		"The value for annotation attribute X.Anno2.value must be an enum constant expression\n" + 
8827
		"----------\n");
8827
		"----------\n");
8828
}
8828
}
8829
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=274917
8830
public void test269() {
8831
	Map customOptions = new Hashtable();
8832
	String[] warnings = CompilerOptions.warningOptionNames();
8833
	for (int i = 0, ceil = warnings.length; i < ceil; i++) {
8834
		customOptions.put(warnings[i], CompilerOptions.WARNING);
8835
	}
8836
	this.runConformTest(
8837
			true,
8838
			new String[] {
8839
					"X.java",
8840
					"@interface X {}",
8841
			},
8842
			null,
8843
			customOptions,
8844
			"----------\n" + 
8845
			"1. WARNING in X.java (at line 1)\n" + 
8846
			"	@interface X {}\n" + 
8847
			"	             ^^\n" + 
8848
			"Empty block should be documented\n" + 
8849
			"----------\n",
8850
			null, null,
8851
			JavacTestOptions.Excuse.EclipseHasSomeMoreWarnings);
8852
}
8829
}
8853
}

Return to bug 274917