aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoracolyer <acolyer>2005-03-10 09:39:56 +0000
committeracolyer <acolyer>2005-03-10 09:39:56 +0000
commit983eb455bf4617debc32779d5ae6d29e4b40e232 (patch)
tree63a4eda102a36b59778db0393af601e084aa9998
parent63f9352372d564ea837feaa459cbddc76afbaa0d (diff)
downloadaspectj-983eb455bf4617debc32779d5ae6d29e4b40e232.tar.gz
aspectj-983eb455bf4617debc32779d5ae6d29e4b40e232.zip
fixes for annotation type pattern bugs uncovered in 150 tests
-rw-r--r--ajde/testdata/DuplicateManifestTest/aspectjar.jarbin2612 -> 2665 bytes
-rw-r--r--ajde/testdata/DuplicateManifestTest/injar.jarbin701 -> 701 bytes
-rw-r--r--ajde/testdata/WeaveInfoMessagesTest/AspectAdvice.jarbin2268 -> 2298 bytes
-rw-r--r--ajde/testdata/WeaveInfoMessagesTest/AspectAdvice_nodebug.jarbin2268 -> 2298 bytes
-rw-r--r--ajde/testdata/WeaveInfoMessagesTest/AspectDeclare.jarbin1758 -> 1782 bytes
-rw-r--r--ajde/testdata/WeaveInfoMessagesTest/AspectDeclareSoft.jarbin1429 -> 1449 bytes
-rw-r--r--ajde/testdata/WeaveInfoMessagesTest/AspectDeclareSoft_nodebug.jarbin1429 -> 1449 bytes
-rw-r--r--ajde/testdata/WeaveInfoMessagesTest/AspectDeclare_nodebug.jarbin1758 -> 1782 bytes
-rw-r--r--ajde/testdata/WeaveInfoMessagesTest/AspectITD.jarbin1782 -> 1806 bytes
-rw-r--r--ajde/testdata/WeaveInfoMessagesTest/AspectITD_nodebug.jarbin1782 -> 1806 bytes
-rw-r--r--ajde/testdata/WeaveInfoMessagesTest/Simple.jarbin686 -> 686 bytes
-rw-r--r--org.aspectj.ajdt.core/testdata/OutjarTest/aspects.jarbin1271 -> 1296 bytes
-rw-r--r--org.aspectj.ajdt.core/testdata/OutjarTest/child.jarbin719 -> 719 bytes
-rw-r--r--org.aspectj.ajdt.core/testdata/OutjarTest/parent.jarbin628 -> 628 bytes
-rw-r--r--tests/bugs/StringToString/helloworld.jarbin1066 -> 1066 bytes
-rw-r--r--tests/bugs/serialVersionUID/injar.jarbin2381 -> 2383 bytes
-rw-r--r--tests/java5/annotations/ajdkExamples/AnnotationsInSignaturePatterns.aj2
-rw-r--r--tests/java5/annotations/ajdkExamples/AnnotationsInTypePatterns.aj2
-rw-r--r--tests/java5/annotations/ajdkExamples/Cachable.java1
-rw-r--r--tests/java5/annotations/ajdkExamples/Immutable.java1
-rw-r--r--tests/java5/annotations/ajdkExamples/Persisted.java1
-rw-r--r--tests/java5/annotations/ajdkExamples/SensitiveData.java1
-rw-r--r--tests/java5/annotations/ajdkExamples/Transaction.java1
-rw-r--r--tests/java5/annotations/ajdkExamples/anns/Cachable.java2
-rw-r--r--tests/java5/annotations/ajdkExamples/anns/Immutable.java2
-rw-r--r--tests/java5/annotations/ajdkExamples/anns/NonPersistent.java (renamed from tests/java5/annotations/ajdkExamples/NonPersistent.java)1
-rw-r--r--tests/java5/annotations/ajdkExamples/anns/Persisted.java2
-rw-r--r--tests/java5/annotations/ajdkExamples/anns/SensitiveData.java2
-rw-r--r--tests/java5/annotations/ajdkExamples/anns/Transaction.java2
-rw-r--r--tests/java5/annotations/ajdkExamples/org/abc/Types.java2
-rw-r--r--tests/java5/annotations/ajdkExamples/org/xyz/OrgXYZAnnotation.java1
-rw-r--r--tests/java5/annotations/ajdkExamples/org/xyz/SignatureTypes.java1
-rw-r--r--tests/java5/annotations/ajdkExamples/org/xyz/Types.java2
-rw-r--r--tests/new/options11/aspectlib1.jarbin1542 -> 1570 bytes
-rw-r--r--tests/new/options11/aspectlib2.jarbin1212 -> 1245 bytes
-rw-r--r--tests/new/options11/injar.jarbin597 -> 597 bytes
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/ajc150.xml27
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/AndTypePattern.java21
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/ExactTypePattern.java8
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/NotTypePattern.java20
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/OrTypePattern.java21
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/TypePattern.java36
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/WildAnnotationTypePattern.java1
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java10
-rw-r--r--weaver/testdata/dummyAspect.jarbin833 -> 861 bytes
-rw-r--r--weaver/testdata/ltw-acaspects.jarbin2462 -> 2485 bytes
-rw-r--r--weaver/testdata/ltw-aspects.jarbin1486 -> 1508 bytes
-rw-r--r--weaver/testdata/ltw-classes.jarbin1486 -> 1486 bytes
-rw-r--r--weaver/testdata/ltw-deaspects.jarbin1105 -> 1131 bytes
-rw-r--r--weaver/testdata/ltw-dwaspects.jarbin1112 -> 1136 bytes
-rw-r--r--weaver/testdata/ltw-itdaspects.jarbin5386 -> 5469 bytes
-rw-r--r--weaver/testdata/ltw-peraspects.jarbin1888 -> 1916 bytes
-rw-r--r--weaver/testdata/ltw-woven.jarbin2705 -> 2735 bytes
-rw-r--r--weaver/testdata/megatrace.jarbin5746 -> 5890 bytes
-rw-r--r--weaver/testdata/megatrace0easy.jarbin3635 -> 3712 bytes
-rw-r--r--weaver/testdata/megatrace0hard.jarbin3531 -> 3615 bytes
-rw-r--r--weaver/testdata/megatraceNoweave.jarbin3183 -> 3234 bytes
-rw-r--r--weaver/testdata/tracing.jarbin2653 -> 2706 bytes
-rw-r--r--weaver/testsrc/org/aspectj/weaver/patterns/AnnotationPatternTestCase.java8
59 files changed, 146 insertions, 32 deletions
diff --git a/ajde/testdata/DuplicateManifestTest/aspectjar.jar b/ajde/testdata/DuplicateManifestTest/aspectjar.jar
index 3ae297a46..4d7da738a 100644
--- a/ajde/testdata/DuplicateManifestTest/aspectjar.jar
+++ b/ajde/testdata/DuplicateManifestTest/aspectjar.jar
Binary files differ
diff --git a/ajde/testdata/DuplicateManifestTest/injar.jar b/ajde/testdata/DuplicateManifestTest/injar.jar
index 712255876..7f1ec16af 100644
--- a/ajde/testdata/DuplicateManifestTest/injar.jar
+++ b/ajde/testdata/DuplicateManifestTest/injar.jar
Binary files differ
diff --git a/ajde/testdata/WeaveInfoMessagesTest/AspectAdvice.jar b/ajde/testdata/WeaveInfoMessagesTest/AspectAdvice.jar
index f838dce1c..f80d8575d 100644
--- a/ajde/testdata/WeaveInfoMessagesTest/AspectAdvice.jar
+++ b/ajde/testdata/WeaveInfoMessagesTest/AspectAdvice.jar
Binary files differ
diff --git a/ajde/testdata/WeaveInfoMessagesTest/AspectAdvice_nodebug.jar b/ajde/testdata/WeaveInfoMessagesTest/AspectAdvice_nodebug.jar
index f838dce1c..309273883 100644
--- a/ajde/testdata/WeaveInfoMessagesTest/AspectAdvice_nodebug.jar
+++ b/ajde/testdata/WeaveInfoMessagesTest/AspectAdvice_nodebug.jar
Binary files differ
diff --git a/ajde/testdata/WeaveInfoMessagesTest/AspectDeclare.jar b/ajde/testdata/WeaveInfoMessagesTest/AspectDeclare.jar
index a40ef7e96..abf2675f5 100644
--- a/ajde/testdata/WeaveInfoMessagesTest/AspectDeclare.jar
+++ b/ajde/testdata/WeaveInfoMessagesTest/AspectDeclare.jar
Binary files differ
diff --git a/ajde/testdata/WeaveInfoMessagesTest/AspectDeclareSoft.jar b/ajde/testdata/WeaveInfoMessagesTest/AspectDeclareSoft.jar
index b606ea4a9..2caea1f7c 100644
--- a/ajde/testdata/WeaveInfoMessagesTest/AspectDeclareSoft.jar
+++ b/ajde/testdata/WeaveInfoMessagesTest/AspectDeclareSoft.jar
Binary files differ
diff --git a/ajde/testdata/WeaveInfoMessagesTest/AspectDeclareSoft_nodebug.jar b/ajde/testdata/WeaveInfoMessagesTest/AspectDeclareSoft_nodebug.jar
index 6afbc5e23..2caea1f7c 100644
--- a/ajde/testdata/WeaveInfoMessagesTest/AspectDeclareSoft_nodebug.jar
+++ b/ajde/testdata/WeaveInfoMessagesTest/AspectDeclareSoft_nodebug.jar
Binary files differ
diff --git a/ajde/testdata/WeaveInfoMessagesTest/AspectDeclare_nodebug.jar b/ajde/testdata/WeaveInfoMessagesTest/AspectDeclare_nodebug.jar
index 330b9962a..348f63857 100644
--- a/ajde/testdata/WeaveInfoMessagesTest/AspectDeclare_nodebug.jar
+++ b/ajde/testdata/WeaveInfoMessagesTest/AspectDeclare_nodebug.jar
Binary files differ
diff --git a/ajde/testdata/WeaveInfoMessagesTest/AspectITD.jar b/ajde/testdata/WeaveInfoMessagesTest/AspectITD.jar
index 40abc4487..a18806b8a 100644
--- a/ajde/testdata/WeaveInfoMessagesTest/AspectITD.jar
+++ b/ajde/testdata/WeaveInfoMessagesTest/AspectITD.jar
Binary files differ
diff --git a/ajde/testdata/WeaveInfoMessagesTest/AspectITD_nodebug.jar b/ajde/testdata/WeaveInfoMessagesTest/AspectITD_nodebug.jar
index 40abc4487..a18806b8a 100644
--- a/ajde/testdata/WeaveInfoMessagesTest/AspectITD_nodebug.jar
+++ b/ajde/testdata/WeaveInfoMessagesTest/AspectITD_nodebug.jar
Binary files differ
diff --git a/ajde/testdata/WeaveInfoMessagesTest/Simple.jar b/ajde/testdata/WeaveInfoMessagesTest/Simple.jar
index d589430a0..e9353128d 100644
--- a/ajde/testdata/WeaveInfoMessagesTest/Simple.jar
+++ b/ajde/testdata/WeaveInfoMessagesTest/Simple.jar
Binary files differ
diff --git a/org.aspectj.ajdt.core/testdata/OutjarTest/aspects.jar b/org.aspectj.ajdt.core/testdata/OutjarTest/aspects.jar
index 8a3a18c3d..267314581 100644
--- a/org.aspectj.ajdt.core/testdata/OutjarTest/aspects.jar
+++ b/org.aspectj.ajdt.core/testdata/OutjarTest/aspects.jar
Binary files differ
diff --git a/org.aspectj.ajdt.core/testdata/OutjarTest/child.jar b/org.aspectj.ajdt.core/testdata/OutjarTest/child.jar
index 4506909e3..0bce4dfde 100644
--- a/org.aspectj.ajdt.core/testdata/OutjarTest/child.jar
+++ b/org.aspectj.ajdt.core/testdata/OutjarTest/child.jar
Binary files differ
diff --git a/org.aspectj.ajdt.core/testdata/OutjarTest/parent.jar b/org.aspectj.ajdt.core/testdata/OutjarTest/parent.jar
index 4c3e5d4f3..d18a9bb6f 100644
--- a/org.aspectj.ajdt.core/testdata/OutjarTest/parent.jar
+++ b/org.aspectj.ajdt.core/testdata/OutjarTest/parent.jar
Binary files differ
diff --git a/tests/bugs/StringToString/helloworld.jar b/tests/bugs/StringToString/helloworld.jar
index 28c795faa..06fd1c15d 100644
--- a/tests/bugs/StringToString/helloworld.jar
+++ b/tests/bugs/StringToString/helloworld.jar
Binary files differ
diff --git a/tests/bugs/serialVersionUID/injar.jar b/tests/bugs/serialVersionUID/injar.jar
index 91e89e700..75a50e57e 100644
--- a/tests/bugs/serialVersionUID/injar.jar
+++ b/tests/bugs/serialVersionUID/injar.jar
Binary files differ
diff --git a/tests/java5/annotations/ajdkExamples/AnnotationsInSignaturePatterns.aj b/tests/java5/annotations/ajdkExamples/AnnotationsInSignaturePatterns.aj
index 066eaef84..86bfbe415 100644
--- a/tests/java5/annotations/ajdkExamples/AnnotationsInSignaturePatterns.aj
+++ b/tests/java5/annotations/ajdkExamples/AnnotationsInSignaturePatterns.aj
@@ -1,4 +1,4 @@
-import org.xyz.*;
+import org.xyz.*; import anns.*;
//import org.abc.*;
import java.util.List;
diff --git a/tests/java5/annotations/ajdkExamples/AnnotationsInTypePatterns.aj b/tests/java5/annotations/ajdkExamples/AnnotationsInTypePatterns.aj
index 2348bce73..37469f5e7 100644
--- a/tests/java5/annotations/ajdkExamples/AnnotationsInTypePatterns.aj
+++ b/tests/java5/annotations/ajdkExamples/AnnotationsInTypePatterns.aj
@@ -1,4 +1,4 @@
-import org.xyz.*;
+import org.xyz.*; import anns.*;
import org.abc.*;
import java.lang.annotation.Inherited;
diff --git a/tests/java5/annotations/ajdkExamples/Cachable.java b/tests/java5/annotations/ajdkExamples/Cachable.java
deleted file mode 100644
index 9cff589ce..000000000
--- a/tests/java5/annotations/ajdkExamples/Cachable.java
+++ /dev/null
@@ -1 +0,0 @@
-public @interface Cachable {} \ No newline at end of file
diff --git a/tests/java5/annotations/ajdkExamples/Immutable.java b/tests/java5/annotations/ajdkExamples/Immutable.java
deleted file mode 100644
index 6a81edf5c..000000000
--- a/tests/java5/annotations/ajdkExamples/Immutable.java
+++ /dev/null
@@ -1 +0,0 @@
-public @interface Immutable {} \ No newline at end of file
diff --git a/tests/java5/annotations/ajdkExamples/Persisted.java b/tests/java5/annotations/ajdkExamples/Persisted.java
deleted file mode 100644
index 28eb9a4ae..000000000
--- a/tests/java5/annotations/ajdkExamples/Persisted.java
+++ /dev/null
@@ -1 +0,0 @@
-public @interface Persisted {} \ No newline at end of file
diff --git a/tests/java5/annotations/ajdkExamples/SensitiveData.java b/tests/java5/annotations/ajdkExamples/SensitiveData.java
deleted file mode 100644
index 71a64d4de..000000000
--- a/tests/java5/annotations/ajdkExamples/SensitiveData.java
+++ /dev/null
@@ -1 +0,0 @@
-public @interface SensitiveData {} \ No newline at end of file
diff --git a/tests/java5/annotations/ajdkExamples/Transaction.java b/tests/java5/annotations/ajdkExamples/Transaction.java
deleted file mode 100644
index e41e0dd98..000000000
--- a/tests/java5/annotations/ajdkExamples/Transaction.java
+++ /dev/null
@@ -1 +0,0 @@
-public @interface Transaction {} \ No newline at end of file
diff --git a/tests/java5/annotations/ajdkExamples/anns/Cachable.java b/tests/java5/annotations/ajdkExamples/anns/Cachable.java
new file mode 100644
index 000000000..9e83a32de
--- /dev/null
+++ b/tests/java5/annotations/ajdkExamples/anns/Cachable.java
@@ -0,0 +1,2 @@
+package anns;
+public @interface Cachable {} \ No newline at end of file
diff --git a/tests/java5/annotations/ajdkExamples/anns/Immutable.java b/tests/java5/annotations/ajdkExamples/anns/Immutable.java
new file mode 100644
index 000000000..ce513836f
--- /dev/null
+++ b/tests/java5/annotations/ajdkExamples/anns/Immutable.java
@@ -0,0 +1,2 @@
+package anns;
+public @interface Immutable {} \ No newline at end of file
diff --git a/tests/java5/annotations/ajdkExamples/NonPersistent.java b/tests/java5/annotations/ajdkExamples/anns/NonPersistent.java
index 6510066c1..88fea3793 100644
--- a/tests/java5/annotations/ajdkExamples/NonPersistent.java
+++ b/tests/java5/annotations/ajdkExamples/anns/NonPersistent.java
@@ -1,3 +1,4 @@
+package anns;
import java.lang.annotation.Inherited;
@Inherited
diff --git a/tests/java5/annotations/ajdkExamples/anns/Persisted.java b/tests/java5/annotations/ajdkExamples/anns/Persisted.java
new file mode 100644
index 000000000..6ddf03086
--- /dev/null
+++ b/tests/java5/annotations/ajdkExamples/anns/Persisted.java
@@ -0,0 +1,2 @@
+package anns;
+public @interface Persisted {} \ No newline at end of file
diff --git a/tests/java5/annotations/ajdkExamples/anns/SensitiveData.java b/tests/java5/annotations/ajdkExamples/anns/SensitiveData.java
new file mode 100644
index 000000000..3919a9177
--- /dev/null
+++ b/tests/java5/annotations/ajdkExamples/anns/SensitiveData.java
@@ -0,0 +1,2 @@
+package anns;
+public @interface SensitiveData {} \ No newline at end of file
diff --git a/tests/java5/annotations/ajdkExamples/anns/Transaction.java b/tests/java5/annotations/ajdkExamples/anns/Transaction.java
new file mode 100644
index 000000000..37124cbef
--- /dev/null
+++ b/tests/java5/annotations/ajdkExamples/anns/Transaction.java
@@ -0,0 +1,2 @@
+package anns;
+public @interface Transaction {} \ No newline at end of file
diff --git a/tests/java5/annotations/ajdkExamples/org/abc/Types.java b/tests/java5/annotations/ajdkExamples/org/abc/Types.java
index b0ed7f8e0..ba8b20140 100644
--- a/tests/java5/annotations/ajdkExamples/org/abc/Types.java
+++ b/tests/java5/annotations/ajdkExamples/org/abc/Types.java
@@ -1,4 +1,4 @@
-
+package org.abc; import anns.*;
class E {}
@Immutable
diff --git a/tests/java5/annotations/ajdkExamples/org/xyz/OrgXYZAnnotation.java b/tests/java5/annotations/ajdkExamples/org/xyz/OrgXYZAnnotation.java
index 963617cbb..04f5e4a2d 100644
--- a/tests/java5/annotations/ajdkExamples/org/xyz/OrgXYZAnnotation.java
+++ b/tests/java5/annotations/ajdkExamples/org/xyz/OrgXYZAnnotation.java
@@ -1 +1,2 @@
+package org.xyz;
public @interface OrgXYZAnnotation {} \ No newline at end of file
diff --git a/tests/java5/annotations/ajdkExamples/org/xyz/SignatureTypes.java b/tests/java5/annotations/ajdkExamples/org/xyz/SignatureTypes.java
index d37157439..ae94e447c 100644
--- a/tests/java5/annotations/ajdkExamples/org/xyz/SignatureTypes.java
+++ b/tests/java5/annotations/ajdkExamples/org/xyz/SignatureTypes.java
@@ -1,3 +1,4 @@
+package org.xyz; import anns.*;
import java.util.List;
import java.util.ArrayList;
diff --git a/tests/java5/annotations/ajdkExamples/org/xyz/Types.java b/tests/java5/annotations/ajdkExamples/org/xyz/Types.java
index 4d0339328..769f02bfc 100644
--- a/tests/java5/annotations/ajdkExamples/org/xyz/Types.java
+++ b/tests/java5/annotations/ajdkExamples/org/xyz/Types.java
@@ -1,4 +1,4 @@
-
+package org.xyz; import anns.*;
@Immutable
class C {}
diff --git a/tests/new/options11/aspectlib1.jar b/tests/new/options11/aspectlib1.jar
index 9a66d122d..680a8f76d 100644
--- a/tests/new/options11/aspectlib1.jar
+++ b/tests/new/options11/aspectlib1.jar
Binary files differ
diff --git a/tests/new/options11/aspectlib2.jar b/tests/new/options11/aspectlib2.jar
index fd8451d86..cab875dee 100644
--- a/tests/new/options11/aspectlib2.jar
+++ b/tests/new/options11/aspectlib2.jar
Binary files differ
diff --git a/tests/new/options11/injar.jar b/tests/new/options11/injar.jar
index fe0827863..429473b8e 100644
--- a/tests/new/options11/injar.jar
+++ b/tests/new/options11/injar.jar
Binary files differ
diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
index 1cda2c53f..4ef1703da 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
+++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
@@ -1052,7 +1052,7 @@
</ajc-test>
<ajc-test dir="java5/annotations/ajdkExamples" title="ajdk: annotation type pattern matching">
- <compile files="AnnotationsInTypePatterns.aj,org/xyz/OrgXYZAnnotation.java,org/xyz/Types.java,org/abc/Types.java,Immutable.java,NonPersistent.java" options="-1.5">
+ <compile files="AnnotationsInTypePatterns.aj,org/xyz/OrgXYZAnnotation.java,org/xyz/Types.java,org/abc/Types.java,anns/Immutable.java,anns/NonPersistent.java" options="-1.5">
<message kind="warning" line="23" text="(@Immutable *)"/>
<message kind="warning" line="32" text="(@Immutable *)"/>
<message kind="warning" line="3" text="(@Immutable *)"/>
@@ -1064,8 +1064,8 @@
<message kind="warning" line="5" text="(!@Immutable *)"/>
<message kind="warning" line="6" text="(!@Immutable *)"/>
<message kind="warning" line="2" text="(!@Immutable *)"/>
- <message kind="warning" line="1" text="(!@Immutable *)"/>
- <message kind="warning" line="4" text="(!@Immutable *)"/>
+ <message kind="warning" line="2" text="(!@Immutable *)"/>
+ <message kind="warning" line="5" text="(!@Immutable *)"/>
<message kind="warning" line="3" text="@Immutable (org.xyz.* || org.abc.*)"/>
<message kind="warning" line="5" text="@Immutable (org.xyz.* || org.abc.*)"/>
<message kind="warning" line="8" text="@Immutable (org.xyz.* || org.abc.*)"/>
@@ -1076,22 +1076,23 @@
<message kind="warning" line="8" text="@(Immutable || NonPersistent) org.xyz..*"/>
<message kind="warning" line="8" text="@Immutable @NonPersistent org.xyz..*"/>
<message kind="warning" line="6" text="@(@Inherited *) org.xyz..*"/>
+ <message kind="warning" line="8" text="@(@Inherited *) org.xyz..*"/>
</compile>
</ajc-test>
<ajc-test dir="java5/annotations/ajdkExamples" title="ajdk: annotations in sig patterns">
- <compile files="AnnotationsInSignaturePatterns.aj,Cachable.java,SensitiveData.java,Persisted.java,Classified.java,Immutable.java,Secure.java,Catastrophic.java,Oneway.java,Transaction.java,org/xyz/SignatureTypes.java" options="-1.5">
+ <compile files="AnnotationsInSignaturePatterns.aj,anns/Cachable.java,anns/SensitiveData.java,anns/Persisted.java,Classified.java,anns/Immutable.java,Secure.java,Catastrophic.java,Oneway.java,anns/Transaction.java,org/xyz/SignatureTypes.java" options="-1.5">
<message kind="warning" line="32" text="@SensitiveData * *"/>
- <message kind="warning" line="6" text="@SensitiveData * *"/>
- <message kind="warning" line="12" text="@SensitiveData * *"/>
- <message kind="warning" line="6" text="@SensitiveData List org.xyz..*.*"/>
- <message kind="warning" line="10" text="(@SensitiveData *) org.xyz..*.*"/>
- <message kind="warning" line="12" text="(@SensitiveData *) org.xyz..*.*"/>
+ <message kind="warning" line="7" text="@SensitiveData * *"/>
+ <message kind="warning" line="13" text="@SensitiveData * *"/>
+ <message kind="warning" line="7" text="@SensitiveData List org.xyz..*.*"/>
+ <message kind="warning" line="11" text="(@SensitiveData *) org.xyz..*.*"/>
+ <message kind="warning" line="13" text="(@SensitiveData *) org.xyz..*.*"/>
<message kind="warning" line="50" text="@Foo (@Goo *) (@Hoo *).*"/>
<message kind="warning" line="38" text="@Persisted @Classified * *"/>
<message kind="warning" line="44" text="@Oneway * *(..)"/>
- <message kind="warning" line="17" text="@Transaction * (@Persisted org.xyz..*).*(..)"/>
+ <message kind="warning" line="18" text="@Transaction * (@Persisted org.xyz..*).*(..)"/>
<message kind="warning" line="52" text="* *.*(@Immutable *,..)"/>
<message kind="warning" line="53" text="* *.*(@Immutable *,..)"/>
<message kind="warning" line="54" text="* *.*(@Immutable *,..)"/>
@@ -1099,10 +1100,10 @@
<message kind="warning" line="62" text="within(@Secure *)"/>
<message kind="warning" line="63" text="within(@Secure *)"/>
<message kind="warning" line="66" text="staticinitialization(@Persisted *)"/>
- <message kind="warning" line="16" text="staticinitialization(@Persisted *)"/>
+ <message kind="warning" line="17" text="staticinitialization(@Persisted *)"/>
<message kind="warning" line="56" text="call(@Oneway * *(..))"/>
- <message kind="warning" line="27" text="execution(public (@Immutable *) org.xyz..*.*(..))"/>
- <message kind="warning" line="25" text="set(@Cachable * *)"/>
+ <message kind="warning" line="28" text="execution(public (@Immutable *) org.xyz..*.*(..))"/>
+ <message kind="warning" line="26" text="set(@Cachable * *)"/>
<message kind="warning" line="80" text="handler(!@Catastrophic *)"/>
</compile>
diff --git a/weaver/src/org/aspectj/weaver/patterns/AndTypePattern.java b/weaver/src/org/aspectj/weaver/patterns/AndTypePattern.java
index 20cdea8ab..022ba5570 100644
--- a/weaver/src/org/aspectj/weaver/patterns/AndTypePattern.java
+++ b/weaver/src/org/aspectj/weaver/patterns/AndTypePattern.java
@@ -51,6 +51,11 @@ public class AndTypePattern extends TypePattern {
return left.matchesExactly(type) && right.matchesExactly(type);
}
+ protected boolean matchesExactly(ResolvedTypeX type, ResolvedTypeX annotatedType) {
+ return left.matchesExactly(type,annotatedType) && right.matchesExactly(type,annotatedType);
+ }
+
+
public boolean matchesStatically(Class type) {
return left.matchesStatically(type) && right.matchesStatically(type);
}
@@ -74,6 +79,22 @@ public class AndTypePattern extends TypePattern {
right.setIsVarArgs(isVarArgs);
}
+ public void setAnnotationTypePattern(AnnotationTypePattern annPatt) {
+ if (annPatt == AnnotationTypePattern.ANY) return;
+ if (left.annotationPattern == AnnotationTypePattern.ANY) {
+ left.setAnnotationTypePattern(annPatt);
+ } else {
+ left.setAnnotationTypePattern(
+ new AndAnnotationTypePattern(left.annotationPattern,annPatt));
+ }
+ if (right.annotationPattern == AnnotationTypePattern.ANY) {
+ right.setAnnotationTypePattern(annPatt);
+ } else {
+ right.setAnnotationTypePattern(
+ new AndAnnotationTypePattern(right.annotationPattern,annPatt));
+ }
+ }
+
public void write(DataOutputStream s) throws IOException {
s.writeByte(TypePattern.AND);
left.write(s);
diff --git a/weaver/src/org/aspectj/weaver/patterns/ExactTypePattern.java b/weaver/src/org/aspectj/weaver/patterns/ExactTypePattern.java
index 5d948adca..b4e4ea7e3 100644
--- a/weaver/src/org/aspectj/weaver/patterns/ExactTypePattern.java
+++ b/weaver/src/org/aspectj/weaver/patterns/ExactTypePattern.java
@@ -92,10 +92,18 @@ public class ExactTypePattern extends TypePattern {
protected boolean matchesExactly(ResolvedTypeX matchType) {
boolean typeMatch = this.type.equals(matchType);
+ annotationPattern.resolve(matchType.getWorld());
boolean annMatch = this.annotationPattern.matches(matchType).alwaysTrue();
return (typeMatch && annMatch);
}
+ protected boolean matchesExactly(ResolvedTypeX matchType, ResolvedTypeX annotatedType) {
+ boolean typeMatch = this.type.equals(matchType);
+ annotationPattern.resolve(matchType.getWorld());
+ boolean annMatch = this.annotationPattern.matches(annotatedType).alwaysTrue();
+ return (typeMatch && annMatch);
+ }
+
public TypeX getType() { return type; }
public FuzzyBoolean matchesInstanceof(ResolvedTypeX matchType) {
diff --git a/weaver/src/org/aspectj/weaver/patterns/NotTypePattern.java b/weaver/src/org/aspectj/weaver/patterns/NotTypePattern.java
index 772b4cdd4..4106af216 100644
--- a/weaver/src/org/aspectj/weaver/patterns/NotTypePattern.java
+++ b/weaver/src/org/aspectj/weaver/patterns/NotTypePattern.java
@@ -17,6 +17,7 @@ import java.io.DataOutputStream;
import java.io.IOException;
import org.aspectj.util.FuzzyBoolean;
+import org.aspectj.weaver.AjAttribute;
import org.aspectj.weaver.ISourceContext;
import org.aspectj.weaver.ResolvedTypeX;
import org.aspectj.weaver.VersionedDataInputStream;
@@ -51,7 +52,11 @@ public class NotTypePattern extends TypePattern {
}
protected boolean matchesExactly(ResolvedTypeX type) {
- return !pattern.matchesExactly(type);
+ return (!pattern.matchesExactly(type) && annotationPattern.matches(type).alwaysTrue());
+ }
+
+ protected boolean matchesExactly(ResolvedTypeX type, ResolvedTypeX annotatedType) {
+ return (!pattern.matchesExactly(type,annotatedType) && annotationPattern.matches(annotatedType).alwaysTrue());
}
public boolean matchesStatically(Class type) {
@@ -70,14 +75,27 @@ public class NotTypePattern extends TypePattern {
return !pattern.matchesStatically(type);
}
+ public void setAnnotationTypePattern(AnnotationTypePattern annPatt) {
+ super.setAnnotationTypePattern(annPatt);
+ }
+
+ public void setIsVarArgs(boolean isVarArgs) {
+ pattern.setIsVarArgs(isVarArgs);
+ }
+
+
public void write(DataOutputStream s) throws IOException {
s.writeByte(TypePattern.NOT);
pattern.write(s);
+ annotationPattern.write(s);
writeLocation(s);
}
public static TypePattern read(VersionedDataInputStream s, ISourceContext context) throws IOException {
TypePattern ret = new NotTypePattern(TypePattern.read(s, context));
+ if (s.getMajorVersion()>=AjAttribute.WeaverVersionInfo.WEAVER_VERSION_MAJOR_AJ150) {
+ ret.annotationPattern = AnnotationTypePattern.read(s,context);
+ }
ret.readLocation(context, s);
return ret;
}
diff --git a/weaver/src/org/aspectj/weaver/patterns/OrTypePattern.java b/weaver/src/org/aspectj/weaver/patterns/OrTypePattern.java
index 642f09ace..e5e372d80 100644
--- a/weaver/src/org/aspectj/weaver/patterns/OrTypePattern.java
+++ b/weaver/src/org/aspectj/weaver/patterns/OrTypePattern.java
@@ -54,6 +54,11 @@ public class OrTypePattern extends TypePattern {
//??? if these had side-effects, this sort-circuit could be a mistake
return left.matchesExactly(type) || right.matchesExactly(type);
}
+
+ protected boolean matchesExactly(ResolvedTypeX type, ResolvedTypeX annotatedType) {
+ //??? if these had side-effects, this sort-circuit could be a mistake
+ return left.matchesExactly(type,annotatedType) || right.matchesExactly(type,annotatedType);
+ }
public boolean matchesStatically(ResolvedTypeX type) {
return left.matchesStatically(type) || right.matchesStatically(type);
@@ -78,6 +83,22 @@ public class OrTypePattern extends TypePattern {
right.setIsVarArgs(isVarArgs);
}
+ public void setAnnotationTypePattern(AnnotationTypePattern annPatt) {
+ if (annPatt == AnnotationTypePattern.ANY) return;
+ if (left.annotationPattern == AnnotationTypePattern.ANY) {
+ left.setAnnotationTypePattern(annPatt);
+ } else {
+ left.setAnnotationTypePattern(
+ new AndAnnotationTypePattern(left.annotationPattern,annPatt));
+ }
+ if (right.annotationPattern == AnnotationTypePattern.ANY) {
+ right.setAnnotationTypePattern(annPatt);
+ } else {
+ right.setAnnotationTypePattern(
+ new AndAnnotationTypePattern(right.annotationPattern,annPatt));
+ }
+ }
+
public void write(DataOutputStream s) throws IOException {
s.writeByte(TypePattern.OR);
left.write(s);
diff --git a/weaver/src/org/aspectj/weaver/patterns/TypePattern.java b/weaver/src/org/aspectj/weaver/patterns/TypePattern.java
index 3e3446ab3..cf0aa4809 100644
--- a/weaver/src/org/aspectj/weaver/patterns/TypePattern.java
+++ b/weaver/src/org/aspectj/weaver/patterns/TypePattern.java
@@ -169,6 +169,8 @@ public abstract class TypePattern extends PatternNode {
}
protected abstract boolean matchesExactly(ResolvedTypeX type);
+
+ protected abstract boolean matchesExactly(ResolvedTypeX type, ResolvedTypeX annotatedType);
protected boolean matchesSubtypes(ResolvedTypeX type) {
//System.out.println("matching: " + this + " to " + type);
@@ -180,7 +182,22 @@ public abstract class TypePattern extends PatternNode {
// FuzzyBoolean ret = FuzzyBoolean.NO; // ??? -eh
for (Iterator i = type.getDirectSupertypes(); i.hasNext(); ) {
ResolvedTypeX superType = (ResolvedTypeX)i.next();
- if (matchesSubtypes(superType)) return true;
+ if (matchesSubtypes(superType,type)) return true;
+ }
+ return false;
+ }
+
+ protected boolean matchesSubtypes(ResolvedTypeX superType, ResolvedTypeX annotatedType) {
+ //System.out.println("matching: " + this + " to " + type);
+ if (matchesExactly(superType,annotatedType)) {
+ //System.out.println(" true");
+ return true;
+ }
+
+ // FuzzyBoolean ret = FuzzyBoolean.NO; // ??? -eh
+ for (Iterator i = superType.getDirectSupertypes(); i.hasNext(); ) {
+ ResolvedTypeX superSuperType = (ResolvedTypeX)i.next();
+ if (matchesSubtypes(superSuperType,annotatedType)) return true;
}
return false;
}
@@ -317,6 +334,10 @@ class EllipsisTypePattern extends TypePattern {
protected boolean matchesExactly(ResolvedTypeX type) {
return false;
}
+
+ protected boolean matchesExactly(ResolvedTypeX type, ResolvedTypeX annotatedType) {
+ return false;
+ }
/**
* @see org.aspectj.weaver.patterns.TypePattern#matchesInstanceof(IType)
@@ -385,6 +406,10 @@ class AnyTypePattern extends TypePattern {
return true;
}
+ protected boolean matchesExactly(ResolvedTypeX type, ResolvedTypeX annotatedType) {
+ return true;
+ }
+
/**
* @see org.aspectj.weaver.patterns.TypePattern#matchesInstanceof(IType)
*/
@@ -461,6 +486,11 @@ class AnyWithAnnotationTypePattern extends TypePattern {
annotationPattern.resolve(type.getWorld());
return annotationPattern.matches(type).alwaysTrue();
}
+
+ protected boolean matchesExactly(ResolvedTypeX type, ResolvedTypeX annotatedType) {
+ annotationPattern.resolve(type.getWorld());
+ return annotationPattern.matches(annotatedType).alwaysTrue();
+ }
public FuzzyBoolean matchesInstanceof(ResolvedTypeX type) {
return FuzzyBoolean.YES;
@@ -531,6 +561,10 @@ class NoTypePattern extends TypePattern {
protected boolean matchesExactly(ResolvedTypeX type) {
return false;
}
+
+ protected boolean matchesExactly(ResolvedTypeX type, ResolvedTypeX annotatedType) {
+ return false;
+ }
/**
* @see org.aspectj.weaver.patterns.TypePattern#matchesInstanceof(IType)
diff --git a/weaver/src/org/aspectj/weaver/patterns/WildAnnotationTypePattern.java b/weaver/src/org/aspectj/weaver/patterns/WildAnnotationTypePattern.java
index 8ca0dd1b5..9019954e2 100644
--- a/weaver/src/org/aspectj/weaver/patterns/WildAnnotationTypePattern.java
+++ b/weaver/src/org/aspectj/weaver/patterns/WildAnnotationTypePattern.java
@@ -75,6 +75,7 @@ public class WildAnnotationTypePattern extends AnnotationTypePattern {
public AnnotationTypePattern resolveBindings(IScope scope, Bindings bindings,
boolean allowBinding)
{
+ if (resolved) return this;
this.typePattern = typePattern.resolveBindings(scope,bindings,false,false);
resolved = true;
if (typePattern instanceof ExactTypePattern) {
diff --git a/weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java b/weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java
index 97a1ee019..0dff4aaad 100644
--- a/weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java
+++ b/weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java
@@ -117,6 +117,10 @@ public class WildTypePattern extends TypePattern {
* @see org.aspectj.weaver.TypePattern#matchesExactly(IType)
*/
protected boolean matchesExactly(ResolvedTypeX type) {
+ return matchesExactly(type,type);
+ }
+
+ protected boolean matchesExactly(ResolvedTypeX type, ResolvedTypeX annotatedType) {
String targetTypeName = type.getName();
//System.err.println("match: " + targetTypeName + ", " + knownMatches); //Arrays.asList(importedPrefixes));
@@ -124,9 +128,10 @@ public class WildTypePattern extends TypePattern {
annotationPattern.resolve(type.getWorld());
return matchesExactlyByName(targetTypeName) &&
- annotationPattern.matches(type).alwaysTrue();
+ annotationPattern.matches(annotatedType).alwaysTrue();
}
-
+
+
/**
* Used in conjunction with checks on 'isStar()' to tell you if this pattern represents '*' or '*[]' which are
* different !
@@ -450,6 +455,7 @@ public class WildTypePattern extends TypePattern {
} else {
if (dim != 0) type = TypeX.makeArray(type, dim);
TypePattern ret = new ExactTypePattern(type, includeSubtypes,isVarArgs);
+ ret.setAnnotationTypePattern(annotationPattern);
ret.copyLocationFrom(this);
return ret;
}
diff --git a/weaver/testdata/dummyAspect.jar b/weaver/testdata/dummyAspect.jar
index 6937bff13..af35626c6 100644
--- a/weaver/testdata/dummyAspect.jar
+++ b/weaver/testdata/dummyAspect.jar
Binary files differ
diff --git a/weaver/testdata/ltw-acaspects.jar b/weaver/testdata/ltw-acaspects.jar
index 702daa9c6..7ee6e9888 100644
--- a/weaver/testdata/ltw-acaspects.jar
+++ b/weaver/testdata/ltw-acaspects.jar
Binary files differ
diff --git a/weaver/testdata/ltw-aspects.jar b/weaver/testdata/ltw-aspects.jar
index dc76dd816..f09ee3db1 100644
--- a/weaver/testdata/ltw-aspects.jar
+++ b/weaver/testdata/ltw-aspects.jar
Binary files differ
diff --git a/weaver/testdata/ltw-classes.jar b/weaver/testdata/ltw-classes.jar
index f5ba5080e..1dfcc034b 100644
--- a/weaver/testdata/ltw-classes.jar
+++ b/weaver/testdata/ltw-classes.jar
Binary files differ
diff --git a/weaver/testdata/ltw-deaspects.jar b/weaver/testdata/ltw-deaspects.jar
index e86ffbe18..186e49409 100644
--- a/weaver/testdata/ltw-deaspects.jar
+++ b/weaver/testdata/ltw-deaspects.jar
Binary files differ
diff --git a/weaver/testdata/ltw-dwaspects.jar b/weaver/testdata/ltw-dwaspects.jar
index 382f74857..791213a88 100644
--- a/weaver/testdata/ltw-dwaspects.jar
+++ b/weaver/testdata/ltw-dwaspects.jar
Binary files differ
diff --git a/weaver/testdata/ltw-itdaspects.jar b/weaver/testdata/ltw-itdaspects.jar
index a0a9b3798..eedfaf505 100644
--- a/weaver/testdata/ltw-itdaspects.jar
+++ b/weaver/testdata/ltw-itdaspects.jar
Binary files differ
diff --git a/weaver/testdata/ltw-peraspects.jar b/weaver/testdata/ltw-peraspects.jar
index aca77d231..53f31b7e6 100644
--- a/weaver/testdata/ltw-peraspects.jar
+++ b/weaver/testdata/ltw-peraspects.jar
Binary files differ
diff --git a/weaver/testdata/ltw-woven.jar b/weaver/testdata/ltw-woven.jar
index ec1fe6d06..c60f5c745 100644
--- a/weaver/testdata/ltw-woven.jar
+++ b/weaver/testdata/ltw-woven.jar
Binary files differ
diff --git a/weaver/testdata/megatrace.jar b/weaver/testdata/megatrace.jar
index 14ae666ee..23a58710d 100644
--- a/weaver/testdata/megatrace.jar
+++ b/weaver/testdata/megatrace.jar
Binary files differ
diff --git a/weaver/testdata/megatrace0easy.jar b/weaver/testdata/megatrace0easy.jar
index 7d076431f..4c025a67f 100644
--- a/weaver/testdata/megatrace0easy.jar
+++ b/weaver/testdata/megatrace0easy.jar
Binary files differ
diff --git a/weaver/testdata/megatrace0hard.jar b/weaver/testdata/megatrace0hard.jar
index 63842de96..15f34d5d3 100644
--- a/weaver/testdata/megatrace0hard.jar
+++ b/weaver/testdata/megatrace0hard.jar
Binary files differ
diff --git a/weaver/testdata/megatraceNoweave.jar b/weaver/testdata/megatraceNoweave.jar
index 772aafbd7..3d5b1fa08 100644
--- a/weaver/testdata/megatraceNoweave.jar
+++ b/weaver/testdata/megatraceNoweave.jar
Binary files differ
diff --git a/weaver/testdata/tracing.jar b/weaver/testdata/tracing.jar
index fc4aef974..8ce561163 100644
--- a/weaver/testdata/tracing.jar
+++ b/weaver/testdata/tracing.jar
Binary files differ
diff --git a/weaver/testsrc/org/aspectj/weaver/patterns/AnnotationPatternTestCase.java b/weaver/testsrc/org/aspectj/weaver/patterns/AnnotationPatternTestCase.java
index 136ab98fa..47b6d46b6 100644
--- a/weaver/testsrc/org/aspectj/weaver/patterns/AnnotationPatternTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/patterns/AnnotationPatternTestCase.java
@@ -170,18 +170,14 @@ public class AnnotationPatternTestCase extends TestCase {
PatternParser p = new PatternParser("(@(Foo || Boo) (Foo || Boo))");
TypePattern t = p.parseTypePattern();
assertTrue("OrTypePattern",t instanceof OrTypePattern);
- WildAnnotationTypePattern wtp = (WildAnnotationTypePattern) t.annotationPattern;
- assertEquals("@((Foo || Boo))",wtp.toString());
- assertEquals("(@((Foo || Boo)) (Foo || Boo))",t.toString());
+ assertEquals("((@((Foo || Boo)) Foo) || (@((Foo || Boo)) Boo))",t.toString());
}
public void testNotSyntax() {
PatternParser p = new PatternParser("!@Foo (Foo || Boo))");
TypePattern t = p.parseTypePattern();
assertTrue("OrTypePattern",t instanceof OrTypePattern);
- NotAnnotationTypePattern natp = (NotAnnotationTypePattern) t.annotationPattern;
- assertEquals("!@(Foo)",natp.toString());
- assertEquals("(!@(Foo) (Foo || Boo))",t.toString());
+ assertEquals("((!@(Foo) Foo) || (!@(Foo) Boo))",t.toString());
}
public void testParseMethodOrConstructorSigNoAP() {