]> source.dussan.org Git - aspectj.git/commitdiff
352363
authoraclement <aclement>
Mon, 18 Jul 2011 16:51:31 +0000 (16:51 +0000)
committeraclement <aclement>
Mon, 18 Jul 2011 16:51:31 +0000 (16:51 +0000)
tests/bugs1612/pr352363/Code.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java
tests/src/org/aspectj/systemtest/ajc1612/ajc1612.xml

diff --git a/tests/bugs1612/pr352363/Code.java b/tests/bugs1612/pr352363/Code.java
new file mode 100644 (file)
index 0000000..2c27133
--- /dev/null
@@ -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";
+}
index 6275d7a3c0429e04ac4fb8c92f0d3e0434298fb8..223c2f2c0de9fe02899ca2ef83940c195d260b3b 100644 (file)
@@ -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");
        }
index b5a23db3c28a96843867ca02081e3fa418d47f73..87412fe0690bed68af64a0f361bdb183f6cd4f90 100644 (file)
@@ -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"/>