diff options
author | aclement <aclement> | 2006-09-14 10:38:50 +0000 |
---|---|---|
committer | aclement <aclement> | 2006-09-14 10:38:50 +0000 |
commit | 70ae0f8df6ec8b77ea2940b222e11d6d411ec5d2 (patch) | |
tree | 86db0f6432995d5fc57dd11bbec7f6b920faa442 | |
parent | 9892449cd6366540f650b45f548f8cc74f6fcae2 (diff) | |
download | aspectj-70ae0f8df6ec8b77ea2940b222e11d6d411ec5d2.tar.gz aspectj-70ae0f8df6ec8b77ea2940b222e11d6d411ec5d2.zip |
test and fix for 153845: Rogue signature containing a 'P' getting into the classfile.
-rw-r--r-- | tests/bugs153/pr153845/Aspect.java | 2 | ||||
-rw-r--r-- | tests/bugs153/pr153845/Aspect2.java | 3 | ||||
-rw-r--r-- | tests/bugs153/pr153845/GenericType.java | 2 | ||||
-rw-r--r-- | tests/bugs153/pr153845/Interface.java | 1 | ||||
-rw-r--r-- | tests/bugs153/pr153845/Nothing.java | 1 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java | 3 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc153/ajc153.xml | 5 | ||||
-rw-r--r-- | weaver/src/org/aspectj/weaver/ReferenceType.java | 2 |
8 files changed, 17 insertions, 2 deletions
diff --git a/tests/bugs153/pr153845/Aspect.java b/tests/bugs153/pr153845/Aspect.java new file mode 100644 index 000000000..267e60253 --- /dev/null +++ b/tests/bugs153/pr153845/Aspect.java @@ -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 index 000000000..1937453d1 --- /dev/null +++ b/tests/bugs153/pr153845/Aspect2.java @@ -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 index 000000000..eea3a2be8 --- /dev/null +++ b/tests/bugs153/pr153845/GenericType.java @@ -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 index 000000000..aa0550856 --- /dev/null +++ b/tests/bugs153/pr153845/Interface.java @@ -0,0 +1 @@ +interface Interface {} diff --git a/tests/bugs153/pr153845/Nothing.java b/tests/bugs153/pr153845/Nothing.java new file mode 100644 index 000000000..e7bdb19f6 --- /dev/null +++ b/tests/bugs153/pr153845/Nothing.java @@ -0,0 +1 @@ +public class Nothing {} diff --git a/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java b/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java index bca26506d..4c8fdd0cd 100644 --- a/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java @@ -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");} diff --git a/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml b/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml index 6c039d0ba..8070cdd30 100644 --- a/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml +++ b/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml @@ -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]"/> diff --git a/weaver/src/org/aspectj/weaver/ReferenceType.java b/weaver/src/org/aspectj/weaver/ReferenceType.java index 812ac2786..41bc6a66a 100644 --- a/weaver/src/org/aspectj/weaver/ReferenceType.java +++ b/weaver/src/org/aspectj/weaver/ReferenceType.java @@ -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(); |