public NotYetABean(Long l) {
}
-}
\ No newline at end of file
+}
package a;
public class Consts {
- static String A_CONST="bla";
+ static String A_CONST="bla"; // default visibility - will be OK, TestNPE is in the same package
}
--- /dev/null
+package a;
+public class Consts2 {
+ private static String A_CONST="bla"; // Should get error in TestNPE - it can't see this to import it.
+}
--- /dev/null
+package a;
+public class Consts3 {
+ protected static String A_CONST="bla"; // should be ok, TestNPE3 is a subclass of Consts
+
+}
--- /dev/null
+package a;
+import static a.Consts2.A_CONST;
+public class TestNPE2 {}
+
--- /dev/null
+package a;
+import static a.Consts3.A_CONST;
+public class TestNPE3 extends a.Consts3 {}
+
return new File("../tests/src/org/aspectj/systemtest/ajc150/ajc150.xml");
}
- public void testCantCallSuperMethods_pr90143() { runTest("cant call super methods");}
/*
public void testBrokenDispatchByITD_pr72834() { runTest("broken dispatch");}
public void testMissingAccessor_pr73856() { runTest("missing accessor");}
public void testCunningDeclareParents_pr92311() { runTest("cunning declare parents");}
public void testGenericITDsAndAbstractMethodError_pr102357() { runTest("generic itds and abstract method error");}
- public void testITDCtor_pr112783() { runTest("Problem with constructor ITDs");}
*/
- public void testPossibleStaticImports_pr113066() { runTest("possible static imports bug");}
+ public void testPossibleStaticImports_pr113066_1() { runTest("possible static imports bug - 1");}
+ public void testPossibleStaticImports_pr113066_2() { runTest("possible static imports bug - 2");}
+ public void testPossibleStaticImports_pr113066_3() { runTest("possible static imports bug - 3");}
+ public void testITDCtor_pr112783() { runTest("Problem with constructor ITDs");}
+ public void testCantCallSuperMethods_pr90143() { runTest("cant call super methods");}
public void testBrokenDecp_pr112476() { runTest("binary weaving decp broken");}
public void testUnboundFormal_pr112027() { runTest("unexpected error unboundFormalInPC");}
public void testNPEScopeSetup_pr115038() { runTest("NPE in ensureScopeSetup");}
</ajc-test>
- <ajc-test dir="bugs150/pr113066" title="possible static imports bug">
+ <ajc-test dir="bugs150/pr113066" title="possible static imports bug - 1">
<compile files="Consts.java,TestNPE.java" options="-1.5"/>
</ajc-test>
+ <ajc-test dir="bugs150/pr113066" title="possible static imports bug - 2">
+ <compile files="Consts2.java,TestNPE2.java" options="-1.5">
+ <message kind="error" line="2" text="The import a.Consts2.A_CONST cannot be resolved"/>
+ </compile>
+ </ajc-test>
+
+ <ajc-test dir="bugs150/pr113066" title="possible static imports bug - 3">
+ <compile files="Consts3.java,TestNPE3.java" options="-1.5"/>
+ </ajc-test>
+
<ajc-test dir="java5/staticImports" title="import static java.lang.System.out">
<compile files="StaticImport.aj" options="-1.5"/>
</ajc-test>