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

Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/ClassFile.java (-1 / +1 lines)
Lines 6373-6379 Link Here
6373
			// pre 1.5, varargs is an attribute, not a modifier (-target jsr14 mode)
6373
			// pre 1.5, varargs is an attribute, not a modifier (-target jsr14 mode)
6374
			accessFlags &= ~(ClassFileConstants.AccSynthetic | ClassFileConstants.AccVarargs);
6374
			accessFlags &= ~(ClassFileConstants.AccSynthetic | ClassFileConstants.AccVarargs);
6375
		}
6375
		}
6376
		if ((methodBinding.tagBits & TagBits.ClearPrivateModifier) != 0) {
6376
		if (methodBinding.isConstructor() && (methodBinding.tagBits & TagBits.ClearPrivateModifier) != 0) {
6377
			accessFlags &= ~ClassFileConstants.AccPrivate;
6377
			accessFlags &= ~ClassFileConstants.AccPrivate;
6378
		}
6378
		}
6379
		this.contents[this.contentsOffset++] = (byte) (accessFlags >> 8);
6379
		this.contents[this.contentsOffset++] = (byte) (accessFlags >> 8);
(-)src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java (-1 / +21 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[] { 269 };
47
//		TESTS_NUMBERS = new int[] { 271 };
48
//		TESTS_RANGE = new int[] { 249, -1 };
48
//		TESTS_RANGE = new int[] { 249, -1 };
49
	}
49
	}
50
50
Lines 8869-8872 Link Here
8869
		"Cycle detected: the annotation type Test<T>.Anno cannot contain attributes of the annotation type itself\n" +
8869
		"Cycle detected: the annotation type Test<T>.Anno cannot contain attributes of the annotation type itself\n" +
8870
		"----------\n");
8870
		"----------\n");
8871
}
8871
}
8872
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=289576
8873
public void test271() throws Exception {
8874
	this.runConformTest(
8875
		new String[] {
8876
			"X.java",
8877
			"@interface A {}\n" + 
8878
			"public class X {\n" + 
8879
			"	@SuppressWarnings(\"unused\")\n" + 
8880
			"	private void foo(@A Object o) {}\n" + 
8881
			"}"
8882
		},
8883
	"");
8884
8885
	String expectedOutput =
8886
		"  // Method descriptor #15 (Ljava/lang/Object;)V\n" + 
8887
		"  // Stack: 0, Locals: 2\n" + 
8888
		"  private void foo(@A java.lang.Object o);\n";
8889
8890
	checkDisassembledClassFile(OUTPUT_DIR + File.separator  +"X.class", "X", expectedOutput, ClassFileBytesDisassembler.DETAILED);
8891
}
8872
}
8892
}

Return to bug 289576