### Eclipse Workspace Patch 1.0 #P tests Index: src/org/aspectj/systemtest/incremental/IncrementalTests.java =================================================================== RCS file: /home/technology/org.aspectj/modules/tests/src/org/aspectj/systemtest/incremental/IncrementalTests.java,v retrieving revision 1.13 diff -u -r1.13 IncrementalTests.java --- src/org/aspectj/systemtest/incremental/IncrementalTests.java 1 Jun 2006 09:48:30 -0000 1.13 +++ src/org/aspectj/systemtest/incremental/IncrementalTests.java 11 Sep 2006 10:11:11 -0000 @@ -280,5 +280,18 @@ RunResult before = run("pack.Main"); } + public void testIncrementalUpdateOfBodyInAroundAdvice_pr154054() throws Exception { + runTest("incremental update of body in around advice"); + nextIncrement(true); + RunResult before = run("MyClass"); + assertTrue("value should be 13 but was " + before.getStdOut(), + before.getStdOut().startsWith("13")); + // update value added to proceed + copyFileAndDoIncrementalBuild("changes/MyAspect.20.aj","src/MyAspect.aj"); + RunResult after = run("MyClass"); + assertTrue("value should be 14 but was " + after.getStdOut(), + after.getStdOut().startsWith("14")); + } + } Index: src/org/aspectj/systemtest/incremental/incremental-junit-tests.xml =================================================================== RCS file: /home/technology/org.aspectj/modules/tests/src/org/aspectj/systemtest/incremental/incremental-junit-tests.xml,v retrieving revision 1.5 diff -u -r1.5 incremental-junit-tests.xml --- src/org/aspectj/systemtest/incremental/incremental-junit-tests.xml 3 Oct 2005 08:46:39 -0000 1.5 +++ src/org/aspectj/systemtest/incremental/incremental-junit-tests.xml 11 Sep 2006 10:11:11 -0000 @@ -388,4 +388,13 @@ + + + + + + \ No newline at end of file Index: bugs153/pr154054/src/MyClass.java =================================================================== RCS file: bugs153/pr154054/src/MyClass.java diff -N bugs153/pr154054/src/MyClass.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ bugs153/pr154054/src/MyClass.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,19 @@ +public class MyClass { + + int x; + + public int getX() { + return x; + } + + public void setX(int x) { + this.x = x; + } + + public static void main(String[] args) { + MyClass m = new MyClass(); + m.setX(10); + System.out.println(m.getX()); + } + +} Index: bugs153/pr154054/src/MyAspect.aj =================================================================== RCS file: bugs153/pr154054/src/MyAspect.aj diff -N bugs153/pr154054/src/MyAspect.aj --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ bugs153/pr154054/src/MyAspect.aj 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,10 @@ +public aspect MyAspect { + + pointcut mypointcut(): execution(* getX()) && !within(MyAspect); + + int around(): mypointcut() { + int w = proceed() + 3; + return w; + } + +} Index: bugs153/pr154054/changes/MyAspect.20.aj =================================================================== RCS file: bugs153/pr154054/changes/MyAspect.20.aj diff -N bugs153/pr154054/changes/MyAspect.20.aj --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ bugs153/pr154054/changes/MyAspect.20.aj 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,10 @@ +public aspect MyAspect { + + pointcut mypointcut(): execution(* getX()) && !within(MyAspect); + + int around(): mypointcut() { + int w = proceed() + 4; + return w; + } + +}