aboutsummaryrefslogtreecommitdiffstats
path: root/tests/features151
diff options
context:
space:
mode:
authoraclement <aclement>2006-03-09 17:24:19 +0000
committeraclement <aclement>2006-03-09 17:24:19 +0000
commit6e6658a5e9e1665d18f3b4eb8d94609592b56228 (patch)
tree1722d0a9c478d5df7c536c2b4157b0d0d91dd667 /tests/features151
parent856694bcf982aa6ec4a6be5df1022b6483608f2d (diff)
downloadaspectj-6e6658a5e9e1665d18f3b4eb8d94609592b56228.tar.gz
aspectj-6e6658a5e9e1665d18f3b4eb8d94609592b56228.zip
101411: -XaddSerialVersionUIDPOST_MEMORY_CHANGES
Diffstat (limited to 'tests/features151')
-rw-r--r--tests/features151/serialveruid/AnAspect.java5
-rw-r--r--tests/features151/serialveruid/Basic.java19
-rw-r--r--tests/features151/serialveruid/BigHorribleClass.java28
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