Lines 6481-6486
Link Here
|
6481 |
IClassFileReader reader = ToolFactory.createDefaultClassFileReader(fileX.getAbsolutePath(), IClassFileReader.CONSTANT_POOL); |
6481 |
IClassFileReader reader = ToolFactory.createDefaultClassFileReader(fileX.getAbsolutePath(), IClassFileReader.CONSTANT_POOL); |
6482 |
assertFalse("Should not be final", Flags.isFinal(reader.getAccessFlags())); |
6482 |
assertFalse("Should not be final", Flags.isFinal(reader.getAccessFlags())); |
6483 |
} |
6483 |
} |
|
|
6484 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=197271 |
6485 |
public void test172() throws Exception { |
6486 |
this.runNegativeTest( |
6487 |
new String[] { |
6488 |
"X.java",//======================= |
6489 |
"public class X {\n" + |
6490 |
" void a() {}\n" + |
6491 |
" private static void a(String s) {}\n" + |
6492 |
" private void c() {}\n" + |
6493 |
" private static void c(String s) {}\n" + |
6494 |
" static class M1 extends X {\n" + |
6495 |
" public void x() {\n" + |
6496 |
" a(null);\n" + |
6497 |
" c(null);\n" + |
6498 |
" }\n" + |
6499 |
" }\n" + |
6500 |
" static class M2 {\n" + |
6501 |
" public void x() {\n" + |
6502 |
" a(null);\n" + |
6503 |
" c(null);\n" + |
6504 |
" }\n" + |
6505 |
" }\n" + |
6506 |
"}\n", |
6507 |
}, |
6508 |
"----------\n" + |
6509 |
"1. WARNING in X.java (at line 4)\n" + |
6510 |
" private void c() {}\n" + |
6511 |
" ^^^\n" + |
6512 |
"The method c() from the type X is never used locally\n" + |
6513 |
"----------\n" + |
6514 |
"2. ERROR in X.java (at line 8)\n" + |
6515 |
" a(null);\n" + |
6516 |
" ^\n" + |
6517 |
"The method a(String) from the type X is not visible\n" + |
6518 |
"----------\n" + |
6519 |
"3. WARNING in X.java (at line 14)\n" + |
6520 |
" a(null);\n" + |
6521 |
" ^^^^^^^\n" + |
6522 |
"Access to enclosing method a(String) from the type X is emulated by a synthetic accessor method. Increasing its visibility will improve your performance\n" + |
6523 |
"----------\n" + |
6524 |
"4. WARNING in X.java (at line 15)\n" + |
6525 |
" c(null);\n" + |
6526 |
" ^^^^^^^\n" + |
6527 |
"Access to enclosing method c(String) from the type X is emulated by a synthetic accessor method. Increasing its visibility will improve your performance\n" + |
6528 |
"----------\n" |
6529 |
); |
6530 |
} |
6484 |
public static Class testClass() { |
6531 |
public static Class testClass() { |
6485 |
return InnerEmulationTest.class; |
6532 |
return InnerEmulationTest.class; |
6486 |
} |
6533 |
} |