@@ -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");} |
@@ -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> |
@@ -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(); | |||
} | |||
} |
@@ -64,4 +64,8 @@ public class PerObjectInterfaceTypeMunger extends ResolvedTypeMunger { | |||
if (matchType.isInterface()) return false; | |||
return getTestTypePattern(aspectType).matchesStatically(matchType); | |||
} | |||
public boolean isLateMunger() { | |||
return true; | |||
} | |||
} |
@@ -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; | |||
} | |||
} |
@@ -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); | |||
} | |||
} |