Browse Source

Fix 432178: percflow concreteaspectcodegen problem

tags/V1_8_0
Andy Clement 10 years ago
parent
commit
c641ffdbb6

+ 3
- 3
loadtime/src/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java View File

@@ -366,11 +366,11 @@ public class ConcreteAspectCodeGen {
if (bytes != null) {
return bytes;
}
PerClause.Kind perclauseKind = PerClause.SINGLETON;
PerClause parentPerClause = (parent != null ? parent.getPerClause() : null);
if (parentPerClause == null) {
parentPerClause = new PerSingleton();
if (parentPerClause != null) {
perclauseKind = parentPerClause.getKind();
}
PerClause.Kind perclauseKind = PerClause.SINGLETON;
String perclauseString = null;

if (concreteAspect.perclause != null) {

+ 9
- 0
tests/bugs180/432178/A.java View File

@@ -0,0 +1,9 @@
public class A
{
public static void main(String [] args)
{
B test = new B();
test.met();
}
}


+ 7
- 0
tests/bugs180/432178/B.java View File

@@ -0,0 +1,7 @@
public class B
{
public void met()
{
System.out.println("foo");
}
}

+ 11
- 0
tests/bugs180/432178/PerCFlowBug.java View File

@@ -0,0 +1,11 @@
public abstract aspect PerCFlowBug percflow(pointexp())
{
String name = "bar";

abstract pointcut pointexp();

after() : pointexp()
{
System.out.println(name);
}
}

+ 9
- 0
tests/bugs180/432178/aop.xml View File

@@ -0,0 +1,9 @@
<aspectj>
<aspects>
<concrete-aspect name="PerCFlowBugImpl" extends="PerCFlowBug">
<pointcut name="pointexp" expression="(call (void *.met(..)))"/>
</concrete-aspect>
</aspects>
<weaver options="-verbose -debug -showWeaveInfo" >
</weaver>
</aspectj>

+ 4
- 0
tests/src/org/aspectj/systemtest/ajc180/Ajc180Tests.java View File

@@ -21,6 +21,10 @@ import org.aspectj.testing.XMLBasedAjcTestCase;
*/
public class Ajc180Tests extends org.aspectj.testing.XMLBasedAjcTestCase {

public void testPercflowLtw_432178() {
runTest("percflow ltw");
}
public void testStackmapframe_431976() {
runTest("stackmapframe");
}

+ 11
- 0
tests/src/org/aspectj/systemtest/ajc180/ajc180.xml View File

@@ -2,6 +2,17 @@

<suite>

<ajc-test dir="bugs180/432178" title="percflow ltw">
<compile options="-1.8" files="A.java B.java"/>
<compile options="-1.8" files="PerCFlowBug.java"/>
<run class="A" ltw="aop.xml">
<stdout>
<line text="foo"/>
<line text="bar"/>
</stdout>
</run>
</ajc-test>
<ajc-test dir="bugs180/pr432714" title="stackmapframe">
<compile options="-1.8" files="Code.java"/>
<run class="Code"/>

Loading…
Cancel
Save