### 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.191 diff -u -r1.191 ClassFile.java --- compiler/org/eclipse/jdt/internal/compiler/ClassFile.java 26 Aug 2009 01:45:52 -0000 1.191 +++ compiler/org/eclipse/jdt/internal/compiler/ClassFile.java 16 Sep 2009 16:46:25 -0000 @@ -6373,7 +6373,7 @@ // pre 1.5, varargs is an attribute, not a modifier (-target jsr14 mode) accessFlags &= ~(ClassFileConstants.AccSynthetic | ClassFileConstants.AccVarargs); } - if ((methodBinding.tagBits & TagBits.ClearPrivateModifier) != 0) { + if (methodBinding.isConstructor() && (methodBinding.tagBits & TagBits.ClearPrivateModifier) != 0) { accessFlags &= ~ClassFileConstants.AccPrivate; } this.contents[this.contentsOffset++] = (byte) (accessFlags >> 8); #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.200 diff -u -r1.200 AnnotationTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java 27 Aug 2009 14:19:18 -0000 1.200 +++ src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java 16 Sep 2009 16:46:25 -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[] { 269 }; +// TESTS_NUMBERS = new int[] { 271 }; // TESTS_RANGE = new int[] { 249, -1 }; } @@ -8869,4 +8869,24 @@ "Cycle detected: the annotation type Test.Anno cannot contain attributes of the annotation type itself\n" + "----------\n"); } +//https://bugs.eclipse.org/bugs/show_bug.cgi?id=289576 +public void test271() throws Exception { + this.runConformTest( + new String[] { + "X.java", + "@interface A {}\n" + + "public class X {\n" + + " @SuppressWarnings(\"unused\")\n" + + " private void foo(@A Object o) {}\n" + + "}" + }, + ""); + + String expectedOutput = + " // Method descriptor #15 (Ljava/lang/Object;)V\n" + + " // Stack: 0, Locals: 2\n" + + " private void foo(@A java.lang.Object o);\n"; + + checkDisassembledClassFile(OUTPUT_DIR + File.separator +"X.class", "X", expectedOutput, ClassFileBytesDisassembler.DETAILED); +} }