aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/bugs1612/pr352363/Code.java25
-rw-r--r--tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java4
-rw-r--r--tests/src/org/aspectj/systemtest/ajc1612/ajc1612.xml7
3 files changed, 36 insertions, 0 deletions
diff --git a/tests/bugs1612/pr352363/Code.java b/tests/bugs1612/pr352363/Code.java
new file mode 100644
index 000000000..2c2713390
--- /dev/null
+++ b/tests/bugs1612/pr352363/Code.java
@@ -0,0 +1,25 @@
+import java.lang.annotation.*;
+
+public class Code {
+
+ @Anno
+ int i=0;
+
+ @Anno(name="foobar")
+ int j=0;
+
+ public void m() {
+ i = i+1;
+ j = j+1;
+ }
+}
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Anno {
+ String name() default "";
+}
+
+aspect X {
+ declare warning: get(@Anno(name="") * *) : "name is empty1";
+ declare warning: get(@Anno(name="foobar") * *) : "name is empty2";
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java b/tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java
index 6275d7a3c..223c2f2c0 100644
--- a/tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java
@@ -25,6 +25,10 @@ public class Ajc1612Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
// runTest("anno copying");
// }
+ public void testEmptyPattern_pr352363() {
+ runTest("empty pattern");
+ }
+
public void testGenericsIssue_pr351592() {
runTest("generics issue");
}
diff --git a/tests/src/org/aspectj/systemtest/ajc1612/ajc1612.xml b/tests/src/org/aspectj/systemtest/ajc1612/ajc1612.xml
index b5a23db3c..87412fe06 100644
--- a/tests/src/org/aspectj/systemtest/ajc1612/ajc1612.xml
+++ b/tests/src/org/aspectj/systemtest/ajc1612/ajc1612.xml
@@ -2,6 +2,13 @@
<suite>
+<ajc-test dir="bugs1612/pr352363" title="empty pattern">
+<compile files="Code.java" options="-1.5">
+ <message line="12" kind="warning" text="name is empty1"/>
+ <message line="13" kind="warning" text="name is empty2"/>
+</compile>
+</ajc-test>
+
<ajc-test dir="bugs1612/pr351592" title="generics issue">
<compile files="Test.java Fib.java FibCaching.aj Caching.aj" options="-1.5"/>
<run class="caching.Test"/>