summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java1
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/ajc150.xml6
-rw-r--r--weaver/src/org/aspectj/weaver/ConcreteTypeMunger.java5
-rw-r--r--weaver/src/org/aspectj/weaver/PerObjectInterfaceTypeMunger.java4
-rw-r--r--weaver/src/org/aspectj/weaver/ResolvedTypeMunger.java8
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java2
6 files changed, 25 insertions, 1 deletions
diff --git a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
index f2d435ee0..f6f142f21 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
@@ -49,6 +49,7 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
public void testGenericITDsAndAbstractMethodError_pr102357() { runTest("generic itds and abstract method error");}
*/
+ public void testClassFormatError_pr114436() { runTest("ClassFormatError binary weaving perthis");}
public void testParserException_pr115788() { runTest("parser exception");}
public void testPossibleStaticImports_pr113066_1() { runTest("possible static imports bug - 1");}
public void testPossibleStaticImports_pr113066_2() { runTest("possible static imports bug - 2");}
diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
index 174172e84..f49ea1c2e 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
+++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
@@ -53,6 +53,12 @@
<compile files="Pr112756.aj" options="-warn:assertIdentifier -Xdev:Pinpoint"/>
</ajc-test>
+ <ajc-test dir="bugs150/pr114436" title="ClassFormatError binary weaving perthis">
+ <compile files="SimpleTrace.aj,ConcreteSimpleTracing.aj" outjar="aspects.jar"/>
+ <compile files="TestClass.java" aspectpath="aspects.jar"/>
+ <run class="TestClass"/>
+ </ajc-test>
+
<ajc-test dir="bugs150/pr113066" title="possible static imports bug - 1">
<compile files="Consts.java,TestNPE.java" options="-1.5"/>
</ajc-test>
diff --git a/weaver/src/org/aspectj/weaver/ConcreteTypeMunger.java b/weaver/src/org/aspectj/weaver/ConcreteTypeMunger.java
index cacaa37d4..24ce48348 100644
--- a/weaver/src/org/aspectj/weaver/ConcreteTypeMunger.java
+++ b/weaver/src/org/aspectj/weaver/ConcreteTypeMunger.java
@@ -110,4 +110,9 @@ public abstract class ConcreteTypeMunger implements PartialOrder.PartialComparab
* of the generic type - either in its raw or parameterized form.
*/
public abstract ConcreteTypeMunger parameterizedFor(ResolvedType targetType);
+
+ public boolean isLateMunger() {
+ if (munger==null) return false;
+ return munger.isLateMunger();
+ }
}
diff --git a/weaver/src/org/aspectj/weaver/PerObjectInterfaceTypeMunger.java b/weaver/src/org/aspectj/weaver/PerObjectInterfaceTypeMunger.java
index 4f4f22c39..3c3e31509 100644
--- a/weaver/src/org/aspectj/weaver/PerObjectInterfaceTypeMunger.java
+++ b/weaver/src/org/aspectj/weaver/PerObjectInterfaceTypeMunger.java
@@ -64,4 +64,8 @@ public class PerObjectInterfaceTypeMunger extends ResolvedTypeMunger {
if (matchType.isInterface()) return false;
return getTestTypePattern(aspectType).matchesStatically(matchType);
}
+
+ public boolean isLateMunger() {
+ return true;
+ }
}
diff --git a/weaver/src/org/aspectj/weaver/ResolvedTypeMunger.java b/weaver/src/org/aspectj/weaver/ResolvedTypeMunger.java
index 67846d5f3..0e95d39c5 100644
--- a/weaver/src/org/aspectj/weaver/ResolvedTypeMunger.java
+++ b/weaver/src/org/aspectj/weaver/ResolvedTypeMunger.java
@@ -393,4 +393,12 @@ public abstract class ResolvedTypeMunger {
public ResolvedMember getDeclaredSignature() {
return declaredSignature;
}
+
+ /**
+ * A late munger has to be done after shadow munging since which shadows are matched
+ * can affect the operation of the late munger. e.g. perobjectinterfacemunger
+ */
+ public boolean isLateMunger() {
+ return false;
+ }
}
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
index 7c0f3f405..794fc84c5 100644
--- a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
+++ b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
@@ -1472,7 +1472,7 @@ public class BcelWeaver implements IWeaver {
if (onType.isRawType() || onType.isParameterizedType()) onType = onType.getGenericType();
for (Iterator i = typeMungerList.iterator(); i.hasNext(); ) {
ConcreteTypeMunger m = (ConcreteTypeMunger)i.next();
- if (m.matches(onType)) {
+ if (!m.isLateMunger() && m.matches(onType)) {
onType.addInterTypeMunger(m);
}
}