From ab2f89bd7314680eda5ff5efeb7e97409ff878d1 Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 17 Jan 2006 15:32:20 +0000 Subject: [PATCH] test and fix for 123612 - remember to clear the caches for declared annotations between compiles. --- tests/multiIncremental/PR123612/base/A.aj | 8 ++++++++ tests/multiIncremental/PR123612/inc1/A.aj | 8 ++++++++ .../incremental/tools/MultiProjectIncrementalTests.java | 9 ++++++++- .../src/org/aspectj/weaver/CrosscuttingMembersSet.java | 3 +++ 4 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 tests/multiIncremental/PR123612/base/A.aj create mode 100644 tests/multiIncremental/PR123612/inc1/A.aj diff --git a/tests/multiIncremental/PR123612/base/A.aj b/tests/multiIncremental/PR123612/base/A.aj new file mode 100644 index 000000000..e11939e90 --- /dev/null +++ b/tests/multiIncremental/PR123612/base/A.aj @@ -0,0 +1,8 @@ +public aspect A { + declare @type : C : @MyAnnotation; +} +@interface MyAnnotation { +} + +class C { +} diff --git a/tests/multiIncremental/PR123612/inc1/A.aj b/tests/multiIncremental/PR123612/inc1/A.aj new file mode 100644 index 000000000..37ff1676d --- /dev/null +++ b/tests/multiIncremental/PR123612/inc1/A.aj @@ -0,0 +1,8 @@ +public aspect A { +// declare @type : C : @MyAnnotation; +} +@interface MyAnnotation { +} + +class C { +} diff --git a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java index ebd34910c..4ae317a69 100644 --- a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java +++ b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java @@ -466,7 +466,14 @@ public class MultiProjectIncrementalTests extends AjdeInteractionTestbed { alter("PR113257","inc1"); build("PR113257"); } - + + public void testPr123612() { + initialiseProject("PR123612"); + build("PR123612"); + alter("PR123612","inc1"); + build("PR123612"); + checkWasntFullBuild(); + } // other possible tests: // - memory usage (freemem calls?) diff --git a/weaver/src/org/aspectj/weaver/CrosscuttingMembersSet.java b/weaver/src/org/aspectj/weaver/CrosscuttingMembersSet.java index 5f9eaf1f0..cbaff05ea 100644 --- a/weaver/src/org/aspectj/weaver/CrosscuttingMembersSet.java +++ b/weaver/src/org/aspectj/weaver/CrosscuttingMembersSet.java @@ -127,6 +127,9 @@ public class CrosscuttingMembersSet { lateTypeMungers = null; declareSofts = null; declareParents = null; + declareAnnotationOnFields=null; + declareAnnotationOnMethods=null; + declareAnnotationOnTypes=null; declareDominates = null; } -- 2.39.5