--- /dev/null
+aspect AnAspect {
+ before(): staticinitialization(BigHorribleClass) {
+
+ }
+}
\ No newline at end of file
--- /dev/null
+import java.io.Serializable;
+import java.lang.reflect.Field;
+
+public class BigHorribleClass implements Serializable,Comparable {
+ public static void main(String[] args) {
+ try {
+ BigHorribleClass b = (BigHorribleClass)BigHorribleClass.class.newInstance();
+ Field f = BigHorribleClass.class.getDeclaredField("serialVersionUID");
+ long l = f.getLong(b);
+ System.err.println("SerialVersionUID is "+l);
+ } catch (Exception e) {
+ System.err.println("Problem: "+e.toString());
+ }
+ }
+
+ public int anInt;
+
+ public static boolean aBoolean = false;
+
+ public long foo = 376;
+
+ public void m() {}
+ public int compareTo(Object o) { return 0;}
+ public String m2(boolean b,long l, String s) { return "";}
+
+ public static transient short fo2 = 3;
+
+}
\ No newline at end of file
--- /dev/null
+<aspectj>
+ <aspects>
+ <aspect name="AnAspect"/>
+ </aspects>
+
+ <weaver options="-showWeaveInfo -XaddSerialVersionUID">
+ </weaver>
+</aspectj>
public class Ajc152Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
+ public void testLTWAndGeneratingSUID_pr144465() { runTest("ltw with serialversionUID creation"); }
public void testAspects14PerSingleton_pr122253() { runTest("aspects14 - persingleton");}
public void testAspects14PerCflow_pr122253() { runTest("aspects14 - percflow");}
public void testAspects14PerThis_pr122253() { runTest("aspects14 - perthis");}
</compile>
</ajc-test>
+ <ajc-test dir="bugs152/pr144465" title="ltw with serialversionUID creation">
+ <compile files="BigHorribleClass.java"/>
+ <compile files="AnAspect.java"/>
+ <run class="BigHorribleClass" ltw="aop1.xml">
+ <stderr>
+ <line text="weaveinfo Join point 'staticinitialization(void BigHorribleClass.<clinit>())'"/>
+ <line text="SerialVersionUID is "/>
+ </stderr>
+ </run>
+ </ajc-test>
+
<ajc-test dir="bugs152/pr125480" title="aop.xml aspect inheriting abstract method ">
<compile files="HelloWorld.java"/>
<compile files="AbstractMethods.aj, ConcreteMethods.aj" options="-1.5"/>