@@ -0,0 +1,13 @@ | |||
public aspect pr109614 { | |||
Object around() : call( NoClassDefFoundError.new(..)) { | |||
return proceed(); | |||
} | |||
public static void main(String []argv) { | |||
new ContractChecking(); | |||
} | |||
} | |||
class ContractChecking { | |||
public static final boolean enabled = Boolean.getBoolean(ContractChecking.class.getName()); | |||
} |
@@ -58,6 +58,7 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase { | |||
public void testAroundAdviceArrayAdviceSigs_pr118781() { runTest("verify error with around advice array sigs");} | |||
public void testAtDeclareParents_pr117681() { runTest("at declare parents");} | |||
public void testPrivilegeProblem_pr87525() { runTest("privilege problem with switch");} | |||
public void testRangeProblem_pr109614() { runTest("Range problem");} | |||
public void testGenericAspects_pr115237() { runTest("aspectOf and generic aspects");} | |||
public void testClassFormatError_pr114436() { runTest("ClassFormatError binary weaving perthis");} | |||
public void testParserException_pr115788() { runTest("parser exception");} |
@@ -175,6 +175,7 @@ | |||
<compile files="PointcutLibrary.aj,ReflectOnAjcCompiledPointcuts.java" options="-1.5"></compile> | |||
<run class="ReflectOnAjcCompiledPointcuts" classpath="../lib/bcel/bcel.jar"/> | |||
</ajc-test> | |||
<ajc-test dir="compatibility/case1" title="generating code for a 1.2.1 runtime - 1"> | |||
<compile files="Simple.java" options="-Xajruntimetarget:1.2"/> | |||
@@ -228,6 +229,12 @@ | |||
<run class="Pr103097"/> | |||
</ajc-test> | |||
<ajc-test dir="bugs150" title="Range problem"> | |||
<compile files="pr109614.java"/> | |||
<run class="pr109614"/> | |||
</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"/> |
@@ -197,7 +197,7 @@ public class BcelShadow extends Shadow { | |||
ih = ih.getPrev(); | |||
} | |||
// now IH points to the NEW. We're followed by the DUP, and that is followed | |||
// by the actual instruciton we care about. | |||
// by the actual instruction we care about. | |||
InstructionHandle newHandle = ih; | |||
InstructionHandle endHandle = newHandle.getNext(); | |||
InstructionHandle nextHandle; | |||
@@ -214,6 +214,7 @@ public class BcelShadow extends Shadow { | |||
// XXX see next XXX comment | |||
throw new RuntimeException("Unhandled kind of new " + endHandle); | |||
} | |||
// Now make any jumps to the 'new', the 'dup' or the 'end' now target the nextHandle | |||
retargetFrom(newHandle, nextHandle); | |||
retargetFrom(dupHandle, nextHandle); | |||
retargetFrom(endHandle, nextHandle); | |||
@@ -237,7 +238,13 @@ public class BcelShadow extends Shadow { | |||
InstructionTargeter[] sources = old.getTargeters(); | |||
if (sources != null) { | |||
for (int i = sources.length - 1; i >= 0; i--) { | |||
sources[i].updateTarget(old, fresh); | |||
if (sources[i] instanceof ExceptionRange) { | |||
ExceptionRange it = (ExceptionRange)sources[i]; | |||
System.err.println("..."); | |||
it.updateTarget(old,fresh,it.getBody()); | |||
} else { | |||
sources[i].updateTarget(old, fresh); | |||
} | |||
} | |||
} | |||
} |