Lines 49884-49887
Link Here
|
49884 |
"" |
49884 |
"" |
49885 |
); |
49885 |
); |
49886 |
} |
49886 |
} |
|
|
49887 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=285002 (visibility error for package private method) |
49888 |
public void test1457() { |
49889 |
this.runConformTest( |
49890 |
new String[] { |
49891 |
"CompilerBug.java", |
49892 |
"public class CompilerBug {\n" + |
49893 |
" public <T> T newInstance( Class<T> c ) throws InstantiationException, IllegalAccessException {\n" + |
49894 |
" return c.newInstance();\n" + |
49895 |
" }\n" + |
49896 |
" protected void protectedMethod() {}\n" + |
49897 |
" void packagePrivateMethod() {}\n" + |
49898 |
" private void privateMethod() {}\n" + |
49899 |
" private int privateInt = 0;\n" + |
49900 |
" int packagePrivateInt = 0;\n" + |
49901 |
" protected int protectedInt = 0;\n" + |
49902 |
" private void isThisBuggy() throws InstantiationException, IllegalAccessException {\n" + |
49903 |
" CompilerBug c = getClass().newInstance();\n" + |
49904 |
" c.privateMethod();\n" + |
49905 |
" c.packagePrivateMethod();\n" + |
49906 |
" c.protectedMethod();\n" + |
49907 |
" getClass().newInstance().packagePrivateMethod();\n" + |
49908 |
" getClass().newInstance().privateMethod();\n" + |
49909 |
" getClass().newInstance().protectedMethod();\n" + |
49910 |
" getClass().newInstance().privateInt = 10;\n" + |
49911 |
" getClass().newInstance().packagePrivateInt = 10;\n" + |
49912 |
" getClass().newInstance().protectedInt = 10;\n" + |
49913 |
" }\n" + |
49914 |
" }\n" |
49915 |
}, |
49916 |
null, |
49917 |
null); // no specific success output string |
49918 |
} |
49887 |
} |
49919 |
} |