aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs152
diff options
context:
space:
mode:
authoraclement <aclement>2006-05-16 07:38:53 +0000
committeraclement <aclement>2006-05-16 07:38:53 +0000
commit9ffc63b51aa49fa3bb67a4a1c40dd7d1fe4c97ae (patch)
tree849734d4b11d088f3f5159c69034c727093397ce /tests/bugs152
parent5c2da6f738945e027241703ef91c49099d9851d8 (diff)
downloadaspectj-9ffc63b51aa49fa3bb67a4a1c40dd7d1fe4c97ae.tar.gz
aspectj-9ffc63b51aa49fa3bb67a4a1c40dd7d1fe4c97ae.zip
tests and fix for 135068: verifyerror for @AJ
Diffstat (limited to 'tests/bugs152')
-rw-r--r--tests/bugs152/pr135068/A.java3
-rw-r--r--tests/bugs152/pr135068/Aaj.aj8
-rw-r--r--tests/bugs152/pr135068/Ajava.java16
-rw-r--r--tests/bugs152/pr135068/Ajava2.java16
-rw-r--r--tests/bugs152/pr135068/C.java14
-rw-r--r--tests/bugs152/pr135068/C2.java14
-rw-r--r--tests/bugs152/pr135068/aop.xml9
-rw-r--r--tests/bugs152/pr135068/t/Aaj.aj10
-rw-r--r--tests/bugs152/pr135068/t/Ajava.java16
-rw-r--r--tests/bugs152/pr135068/t/Ajava2.java16
-rw-r--r--tests/bugs152/pr135068/t/C.java20
-rw-r--r--tests/bugs152/pr135068/t/C2.java20
12 files changed, 162 insertions, 0 deletions
diff --git a/tests/bugs152/pr135068/A.java b/tests/bugs152/pr135068/A.java
new file mode 100644
index 000000000..adbab3f93
--- /dev/null
+++ b/tests/bugs152/pr135068/A.java
@@ -0,0 +1,3 @@
+aspect A {
+ static before(): call(* *(..)) {}
+}
diff --git a/tests/bugs152/pr135068/Aaj.aj b/tests/bugs152/pr135068/Aaj.aj
new file mode 100644
index 000000000..48af01dba
--- /dev/null
+++ b/tests/bugs152/pr135068/Aaj.aj
@@ -0,0 +1,8 @@
+import java.net.InetAddress;
+
+public aspect Aaj {
+
+ InetAddress around() throws java.net.UnknownHostException : call(public java.net.InetAddress C.getAddress() throws java.net.UnknownHostException) {
+ return InetAddress.getLocalHost();
+ }
+}
diff --git a/tests/bugs152/pr135068/Ajava.java b/tests/bugs152/pr135068/Ajava.java
new file mode 100644
index 000000000..c00aa7952
--- /dev/null
+++ b/tests/bugs152/pr135068/Ajava.java
@@ -0,0 +1,16 @@
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.*;
+
+@Aspect
+public class Ajava {
+
+ @Around("call(public java.net.InetAddress C.getAddress() throws java.net.UnknownHostException)")
+ public InetAddress getAddress() throws UnknownHostException {
+ return InetAddress.getLocalHost();
+ }
+}
diff --git a/tests/bugs152/pr135068/Ajava2.java b/tests/bugs152/pr135068/Ajava2.java
new file mode 100644
index 000000000..cfe0d05b0
--- /dev/null
+++ b/tests/bugs152/pr135068/Ajava2.java
@@ -0,0 +1,16 @@
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.*;
+
+@Aspect
+public class Ajava2 {
+
+ @Around("call(public java.net.InetAddress C2.getAddress() throws java.net.UnknownHostException)")
+ public static InetAddress getAddress() throws UnknownHostException {
+ return InetAddress.getLocalHost();
+ }
+}
diff --git a/tests/bugs152/pr135068/C.java b/tests/bugs152/pr135068/C.java
new file mode 100644
index 000000000..4e8c71d98
--- /dev/null
+++ b/tests/bugs152/pr135068/C.java
@@ -0,0 +1,14 @@
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+
+public class C {
+
+ public static InetAddress getAddress() throws UnknownHostException {
+ return null;
+ }
+
+ public static void main(String[] args) throws Exception {
+ System.out.println(getAddress().toString());
+ }
+}
diff --git a/tests/bugs152/pr135068/C2.java b/tests/bugs152/pr135068/C2.java
new file mode 100644
index 000000000..b363356b1
--- /dev/null
+++ b/tests/bugs152/pr135068/C2.java
@@ -0,0 +1,14 @@
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+
+public class C2 {
+
+ public static InetAddress getAddress() throws UnknownHostException {
+ return null;
+ }
+
+ public static void main(String[] args) throws Exception {
+ System.out.println(getAddress().toString());
+ }
+}
diff --git a/tests/bugs152/pr135068/aop.xml b/tests/bugs152/pr135068/aop.xml
new file mode 100644
index 000000000..eaef22b32
--- /dev/null
+++ b/tests/bugs152/pr135068/aop.xml
@@ -0,0 +1,9 @@
+<aspectj>
+ <aspects>
+ <aspect name="t.Ajava"/>
+ </aspects>
+
+ <weaver>
+ <include within="t..*"/>
+ </weaver>
+</aspectj>
diff --git a/tests/bugs152/pr135068/t/Aaj.aj b/tests/bugs152/pr135068/t/Aaj.aj
new file mode 100644
index 000000000..8123292fe
--- /dev/null
+++ b/tests/bugs152/pr135068/t/Aaj.aj
@@ -0,0 +1,10 @@
+package t;
+
+import java.net.InetAddress;
+
+public aspect Aaj {
+
+ InetAddress around() throws java.net.UnknownHostException : call(public java.net.InetAddress t.C.getAddress() throws java.net.UnknownHostException) {
+ return InetAddress.getLocalHost();
+ }
+}
diff --git a/tests/bugs152/pr135068/t/Ajava.java b/tests/bugs152/pr135068/t/Ajava.java
new file mode 100644
index 000000000..fc519368b
--- /dev/null
+++ b/tests/bugs152/pr135068/t/Ajava.java
@@ -0,0 +1,16 @@
+package t;
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+
+@Aspect
+public class Ajava {
+
+ @Around("call(public java.net.InetAddress t.C.getAddress() throws java.net.UnknownHostException)")
+ public InetAddress getAddress() throws UnknownHostException {
+ return InetAddress.getLocalHost();
+ }
+}
diff --git a/tests/bugs152/pr135068/t/Ajava2.java b/tests/bugs152/pr135068/t/Ajava2.java
new file mode 100644
index 000000000..5bf933c5d
--- /dev/null
+++ b/tests/bugs152/pr135068/t/Ajava2.java
@@ -0,0 +1,16 @@
+package t;
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+
+@Aspect
+public class Ajava2 {
+
+ @Around("call(public java.net.InetAddress t.C2.getAddress() throws java.net.UnknownHostException)")
+ public static InetAddress getAddress() throws UnknownHostException {
+ return InetAddress.getLocalHost();
+ }
+}
diff --git a/tests/bugs152/pr135068/t/C.java b/tests/bugs152/pr135068/t/C.java
new file mode 100644
index 000000000..a36f333a8
--- /dev/null
+++ b/tests/bugs152/pr135068/t/C.java
@@ -0,0 +1,20 @@
+package t;
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+
+public class C {
+
+ public InetAddress getAddress() throws UnknownHostException {
+ return null;
+ }
+
+ private void test() throws UnknownHostException {
+ System.out.println(getAddress().toString());
+ }
+
+ public static void main(String[] args) throws Exception {
+ C c = new C();
+ c.test();
+ }
+}
diff --git a/tests/bugs152/pr135068/t/C2.java b/tests/bugs152/pr135068/t/C2.java
new file mode 100644
index 000000000..32cf00136
--- /dev/null
+++ b/tests/bugs152/pr135068/t/C2.java
@@ -0,0 +1,20 @@
+package t;
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+
+public class C2 {
+
+ public InetAddress getAddress() throws UnknownHostException {
+ return null;
+ }
+
+ private void test() throws UnknownHostException {
+ System.out.println(getAddress().toString());
+ }
+
+ public static void main(String[] args) throws Exception {
+ C2 c = new C2();
+ c.test();
+ }
+}