--- /dev/null
+import java.io.Serializable;
+import java.lang.reflect.Field;
+
+public class Indirect implements I {
+ public static void main(String[] args) {
+ try {
+ Indirect b = (Indirect)Indirect.class.newInstance();
+ Field f = Indirect.class.getDeclaredField("serialVersionUID");
+ long l = f.getLong(b);
+ System.err.println("SerialVersionUID is "+l);
+ } catch (Exception e) {
+ System.err.println("Problem: "+e.toString());
+ }
+ }
+}
+
+interface I extends Serializable {}
+
+aspect X {
+ before(): staticinitialization(Indirect) {}
+}
// public void testBrokenIfArgsCflowAtAj_pr145018() { runTest("ataj crashing with cflow, if and args");}
// public void testItdCallingGenericMethod_pr145391() { runTest("itd calling generic method");}
// public void testItdCallingGenericMethod_pr145391_2() { runTest("itd calling generic method - 2");}
+ public void testBrokenAddSerialVersionUID_pr145950() {runTest("fails to discover Serializable");}
public void testNoUnnecessaryDeclarationOfThrownExcp_pr129282_1() {runTest("no unnecessary declaration of thrown exception warning - 1");}
public void testNoUnnecessaryDeclarationOfThrownExcp_pr129282_2() {runTest("no unnecessary declaration of thrown exception warning - 2");}
public void testNoUnnecessaryDeclarationOfThrownExcp_pr129282_3() {runTest("no unnecessary declaration of thrown exception warning - 3");}
<compile files="Test.java" options="-1.5"/>
</ajc-test>
+ <ajc-test dir="bugs152/pr145950" title="fails to discover Serializable">
+ <compile files="Indirect.java" options="-1.5 -XaddSerialVersionUID"/>
+ <run class="Indirect">
+ <stderr>
+ <line text="SerialVersionUID is "/>
+ </stderr>
+ </run>
+ </ajc-test>
+
<ajc-test dir="bugs152/pr145018" title="ataj crashing with cflow, if and args">
<compile files="Broken.aj" options="-1.5"/>
<run class="Broken">