]> source.dussan.org Git - aspectj.git/commitdiff
333469
authoraclement <aclement>
Sat, 8 Jan 2011 01:17:40 +0000 (01:17 +0000)
committeraclement <aclement>
Sat, 8 Jan 2011 01:17:40 +0000 (01:17 +0000)
tests/bugs1611/pr333469/MyList.java [new file with mode: 0644]
tests/bugs1611/pr333469/MyList_Serializable.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc1611/Ajc1611Tests.java
tests/src/org/aspectj/systemtest/ajc1611/ajc1611.xml

diff --git a/tests/bugs1611/pr333469/MyList.java b/tests/bugs1611/pr333469/MyList.java
new file mode 100644 (file)
index 0000000..55cb838
--- /dev/null
@@ -0,0 +1,10 @@
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+
+public class MyList extends ArrayList<Integer> {
+       public static void main(String []argv) throws Exception {
+               Field f = MyList.class.getDeclaredField("serialVersionUID");
+               f.setAccessible(true);
+               System.out.println("ser="+f.getLong(new MyList()));
+       }
+}
\ No newline at end of file
diff --git a/tests/bugs1611/pr333469/MyList_Serializable.java b/tests/bugs1611/pr333469/MyList_Serializable.java
new file mode 100644 (file)
index 0000000..6d040e5
--- /dev/null
@@ -0,0 +1,7 @@
+import java.io.Serializable;
+
+aspect MyList_Serializable {
+  declare parents : MyList implements Serializable;
+
+  private static final long MyList.serialVersionUID = 1L; // causes compiler failure
+}
\ No newline at end of file
index 408ebb02d93834120388cf6a7bd54a308d273e44..0c9005e26307b576621cfd01f379eaa39ce27b96 100644 (file)
@@ -21,6 +21,10 @@ import org.aspectj.testing.XMLBasedAjcTestCase;
  */
 public class Ajc1611Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
 
+       public void testGenericsAndItds_333469() {
+               runTest("pr333469");
+       }
+
        public void testMissingType_332388() {
                runTest("pr332388");
        }
index c9bc40889581ccf9136cd8968d72e43bf19cc4e7..c378572221f9aeb9496a6d1e11ca294639aac6b7 100644 (file)
      </compile>
   </ajc-test>
   
+  <ajc-test dir="bugs1611/pr333469" title="pr333469">
+     <compile files="MyList.java MyList_Serializable.java" options="-1.5"/>
+     <run class="MyList">
+     <stdout><line text="ser=1"/></stdout>
+     </run>
+  </ajc-test>
+  
   <ajc-test dir="bugs1611/pr332388_2" title="pr332388 - 2">
      <compile files="M.java" outjar="M.jar" options="-1.5"/>
      <compile files="A.java" classpath="M.jar" outjar="A.jar" options="-1.5"/>