]> source.dussan.org Git - aspectj.git/commitdiff
testcode for 137568,138143,138158
authoraclement <aclement>
Mon, 24 Apr 2006 08:17:08 +0000 (08:17 +0000)
committeraclement <aclement>
Mon, 24 Apr 2006 08:17:08 +0000 (08:17 +0000)
tests/bugs152/pr137568/C.java [new file with mode: 0644]
tests/bugs152/pr138143/AspectClass.java [new file with mode: 0644]
tests/bugs152/pr138158/Boo.java [new file with mode: 0644]

diff --git a/tests/bugs152/pr137568/C.java b/tests/bugs152/pr137568/C.java
new file mode 100644 (file)
index 0000000..4134152
--- /dev/null
@@ -0,0 +1,19 @@
+interface IGuard<P> {}
+
+interface Guard<P> extends IGuard<P> {}
+
+class GuardImpl implements Guard<String> {}
+
+public class C<T> {
+
+  private boolean m1(Class<? extends IGuard<T>> guardClz) throws Exception { return false;}
+  private boolean m2(Class<? extends IGuard<T>>[] guardClz) throws Exception { return false;}
+
+  public static void main(String []argv) throws Exception {
+    GuardImpl g = new GuardImpl();
+    C<String> newC = new C<String>();
+    newC.m1(g.getClass());
+    newC.m2(new Class[]{g.getClass()});
+  }
+
+}
\ No newline at end of file
diff --git a/tests/bugs152/pr138143/AspectClass.java b/tests/bugs152/pr138143/AspectClass.java
new file mode 100644 (file)
index 0000000..772b2d4
--- /dev/null
@@ -0,0 +1,15 @@
+import org.aspectj.lang.annotation.*;
+
+@Aspect
+public class AspectClass{
+
+       @Pointcut("call(@Incoming * *(..))")
+       public void incomingMessage() {
+       }
+
+
+       @Pointcut("call(@Activity * *(..))")
+       public void incomingMessage() {
+       }
+
+}
\ No newline at end of file
diff --git a/tests/bugs152/pr138158/Boo.java b/tests/bugs152/pr138158/Boo.java
new file mode 100644 (file)
index 0000000..7a3bb0f
--- /dev/null
@@ -0,0 +1,21 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Goo {}
+
+
+public class Boo {
+  public static void main(String []argv) {
+    new Boo().m(); // advises here
+  }
+
+  @Goo
+  public void m() {
+    System.err.println("");
+  }
+}
+
+aspect X {
+  before(): call(* *(..)) && !@withincode(Goo) {
+  }
+}
\ No newline at end of file