summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Clement <aclement@gopivotal.com>2014-04-14 15:01:56 -0700
committerAndy Clement <aclement@gopivotal.com>2014-04-14 15:01:56 -0700
commit5aaca752afa424015f81379dcd0a69e737340e56 (patch)
tree15d2c5ccd54098757f9074dc822c3a1f55806861
parent331399f82b33cc4cff8239aab18e405dfe0dd2b9 (diff)
downloadaspectj-1_8_0RC3.tar.gz
aspectj-1_8_0RC3.zip
Fix 432714: stack map frame and genericsV1_8_0RC3
-rw-r--r--tests/bugs180/pr432714/Code.java25
-rw-r--r--tests/src/org/aspectj/systemtest/ajc180/Ajc180Tests.java8
-rw-r--r--tests/src/org/aspectj/systemtest/ajc180/ajc180.xml9
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/asm/StackMapAdder.java3
4 files changed, 45 insertions, 0 deletions
diff --git a/tests/bugs180/pr432714/Code.java b/tests/bugs180/pr432714/Code.java
new file mode 100644
index 000000000..af871ab18
--- /dev/null
+++ b/tests/bugs180/pr432714/Code.java
@@ -0,0 +1,25 @@
+public class Code {
+ public static void main(String[]argv) {
+ }
+
+ public void foo(UID x) {
+ bar((x instanceof UID ? E.one : E.two));
+ }
+
+ public static void bar(FM fm) { }
+}
+
+aspect X {
+ void around(): execution(* foo(..)) {
+ }
+}
+
+class E {
+ static BBB one;
+ static CCC two;
+ class BBB extends FM<String> {}
+ class CCC extends FM<Long> {}
+}
+class FM<T> {}
+
+class UID {}
diff --git a/tests/src/org/aspectj/systemtest/ajc180/Ajc180Tests.java b/tests/src/org/aspectj/systemtest/ajc180/Ajc180Tests.java
index 3da1f12b6..9a200fa9a 100644
--- a/tests/src/org/aspectj/systemtest/ajc180/Ajc180Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc180/Ajc180Tests.java
@@ -20,6 +20,14 @@ import org.aspectj.testing.XMLBasedAjcTestCase;
* @author Andy Clement
*/
public class Ajc180Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
+
+ public void testStackmapframe_431976() {
+ runTest("stackmapframe");
+ }
+
+ public void testStackOverflow_432608() {
+ runTest("stackoverflow");
+ }
public void testThisJoinPointNotInitialized_431976() {
runTest("thisJoinPoint not initialized");
diff --git a/tests/src/org/aspectj/systemtest/ajc180/ajc180.xml b/tests/src/org/aspectj/systemtest/ajc180/ajc180.xml
index 6f7b0c586..924ec89e5 100644
--- a/tests/src/org/aspectj/systemtest/ajc180/ajc180.xml
+++ b/tests/src/org/aspectj/systemtest/ajc180/ajc180.xml
@@ -2,6 +2,15 @@
<suite>
+ <ajc-test dir="bugs180/pr432714" title="stackmapframe">
+ <compile options="-1.8" files="Code.java"/>
+ <run class="Code"/>
+ </ajc-test>
+
+ <ajc-test dir="bugs180/pr432608" title="stackoverflow">
+ <compile options="-1.8" files="AbstractControlPoint.java"/>
+ </ajc-test>
+
<ajc-test dir="bugs180/pr431976" title="thisJoinPoint not initialized">
<compile options="-1.8" files="Code.java"/>
</ajc-test>
diff --git a/weaver/src/org/aspectj/weaver/bcel/asm/StackMapAdder.java b/weaver/src/org/aspectj/weaver/bcel/asm/StackMapAdder.java
index 7f8c2ad3b..4624dda29 100644
--- a/weaver/src/org/aspectj/weaver/bcel/asm/StackMapAdder.java
+++ b/weaver/src/org/aspectj/weaver/bcel/asm/StackMapAdder.java
@@ -97,6 +97,9 @@ public class StackMapAdder {
} else {
do {
resolvedType1 = resolvedType1.getSuperclass();
+ if (resolvedType1.isParameterizedOrGenericType()) {
+ resolvedType1 = resolvedType1.getRawType();
+ }
} while (!resolvedType1.isAssignableFrom(resolvedType2));
return resolvedType1.getRawName().replace('.', '/');
}