]> source.dussan.org Git - aspectj.git/commitdiff
test and fix for 153845: Rogue signature containing a 'P' getting into the classfile.
authoraclement <aclement>
Thu, 14 Sep 2006 10:38:50 +0000 (10:38 +0000)
committeraclement <aclement>
Thu, 14 Sep 2006 10:38:50 +0000 (10:38 +0000)
tests/bugs153/pr153845/Aspect.java [new file with mode: 0644]
tests/bugs153/pr153845/Aspect2.java [new file with mode: 0644]
tests/bugs153/pr153845/GenericType.java [new file with mode: 0644]
tests/bugs153/pr153845/Interface.java [new file with mode: 0644]
tests/bugs153/pr153845/Nothing.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java
tests/src/org/aspectj/systemtest/ajc153/ajc153.xml
weaver/src/org/aspectj/weaver/ReferenceType.java

diff --git a/tests/bugs153/pr153845/Aspect.java b/tests/bugs153/pr153845/Aspect.java
new file mode 100644 (file)
index 0000000..267e602
--- /dev/null
@@ -0,0 +1,2 @@
+import java.util.*;
+public aspect Aspect extends GenericType<Set<String>> {}
diff --git a/tests/bugs153/pr153845/Aspect2.java b/tests/bugs153/pr153845/Aspect2.java
new file mode 100644 (file)
index 0000000..1937453
--- /dev/null
@@ -0,0 +1,3 @@
+public aspect Aspect2 {
+  declare parents: Aspect implements Interface;
+}
diff --git a/tests/bugs153/pr153845/GenericType.java b/tests/bugs153/pr153845/GenericType.java
new file mode 100644 (file)
index 0000000..eea3a2b
--- /dev/null
@@ -0,0 +1,2 @@
+public class GenericType<T> {
+}
diff --git a/tests/bugs153/pr153845/Interface.java b/tests/bugs153/pr153845/Interface.java
new file mode 100644 (file)
index 0000000..aa05508
--- /dev/null
@@ -0,0 +1 @@
+interface Interface {}
diff --git a/tests/bugs153/pr153845/Nothing.java b/tests/bugs153/pr153845/Nothing.java
new file mode 100644 (file)
index 0000000..e7bdb19
--- /dev/null
@@ -0,0 +1 @@
+public class Nothing {}
index bca26506d7021fe100e9e806c4f39ed4793f4b49..4c8fdd0cdd12f6653f41fb8301f76ae9c6ffbada 100644 (file)
@@ -27,7 +27,8 @@ public class Ajc153Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
   // public void testArgnamesAndJavac_pr148381() { runTest("argNames and javac");}
   // public void testCFlowXMLAspectLTW_pr149096() { runTest("cflow xml concrete aspect"); }
   // public void testAmbiguousBinding_pr121805() { runTest("ambiguous binding");}
-//  public void testNoIllegalStateExceptionWithGenericInnerAspect_pr156058() { runTest("no IllegalStateException with generic inner aspect"); }  
+//  public void testNoIllegalStateExceptionWithGenericInnerAspect_pr156058() { runTest("no IllegalStateException with generic inner aspect"); }
+  public void testIllegalStateExceptionGenerics_pr153845() { runTest("IllegalStateException at GenericSignatureParser.java"); }
   public void testNoIllegalStateExceptionFromAsmDelegate_pr153490_1() { runTest("no illegal state exception from AsmDelegate - 1");}
   public void testNoIllegalStateExceptionFromAsmDelegate_pr153490_2() { runTest("no illegal state exception from AsmDelegate - 2");}
   public void testNoIllegalStateExceptionFromAsmDelegate_pr153490_3() { runTest("no illegal state exception from AsmDelegate - 3");}
index 6c039d0bab5c300924d5d314b075749d69bbe3a1..8070cdd3012b155f998700130538b4d676717d8c 100644 (file)
@@ -3,6 +3,11 @@
 <!-- AspectJ v1.5.3 Tests -->
 <suite>
 
+    <ajc-test dir="bugs153/pr153845" title="IllegalStateException at GenericSignatureParser.java">
+      <compile files="GenericType.java,Aspect.java,Aspect2.java,Interface.java" options="-1.5" outjar="blob.jar"/>
+      <compile files="Nothing.java" aspectpath="blob.jar" options="-1.5" outjar="bang.jar"/>
+    </ajc-test>
+
     <ajc-test dir="bugs153/pr156058" title="no IllegalStateException with generic inner aspect">
       <compile files="Bug.java" options="-1.5">
         <message kind="warning" line="2" text="advice defined in MyAspect has not been applied [Xlint:adviceDidNotMatch]"/>
index 812ac27861ba39a6644de1d32a3e49fff151eb6f..41bc6a66a9dd43e6caecdb09039b6e2eafb9bcc4 100644 (file)
@@ -714,7 +714,7 @@ public class ReferenceType extends ResolvedType {
                ret.append(rawSig.substring(0,rawSig.length()-1));
                ret.append("<");
                for (int i = 0; i < someParameters.length; i++) {
-                       ret.append(someParameters[i].getSignature());                   
+                       ret.append(((ReferenceType)someParameters[i]).getSignatureForAttribute());                      
                }
                ret.append(">;");
                return ret.toString();