diff options
Diffstat (limited to 'tests/features151')
-rw-r--r-- | tests/features151/serialveruid/AnAspect.java | 5 | ||||
-rw-r--r-- | tests/features151/serialveruid/Basic.java | 19 | ||||
-rw-r--r-- | tests/features151/serialveruid/BigHorribleClass.java | 28 |
3 files changed, 52 insertions, 0 deletions
diff --git a/tests/features151/serialveruid/AnAspect.java b/tests/features151/serialveruid/AnAspect.java new file mode 100644 index 000000000..eff8137e8 --- /dev/null +++ b/tests/features151/serialveruid/AnAspect.java @@ -0,0 +1,5 @@ +aspect AnAspect { + before(): staticinitialization(BigHorribleClass) { + + } +}
\ No newline at end of file diff --git a/tests/features151/serialveruid/Basic.java b/tests/features151/serialveruid/Basic.java new file mode 100644 index 000000000..f2093d59b --- /dev/null +++ b/tests/features151/serialveruid/Basic.java @@ -0,0 +1,19 @@ +import java.io.Serializable; +import java.lang.reflect.Field; + +public class Basic implements Serializable { + public static void main(String[] args) { + try { + Basic b = (Basic)Basic.class.newInstance(); + Field f = Basic.class.getDeclaredField("serialVersionUID"); + long l = f.getLong(b); + System.err.println("SerialVersionUID is "+l); + } catch (Exception e) { + System.err.println("Problem: "+e.toString()); + } + } +} + +aspect X { + before(): staticinitialization(Basic) {} +}
\ No newline at end of file diff --git a/tests/features151/serialveruid/BigHorribleClass.java b/tests/features151/serialveruid/BigHorribleClass.java new file mode 100644 index 000000000..7668307b2 --- /dev/null +++ b/tests/features151/serialveruid/BigHorribleClass.java @@ -0,0 +1,28 @@ +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 |