aboutsummaryrefslogtreecommitdiffstats
path: root/tests/java5
diff options
context:
space:
mode:
authoraclement <aclement>2005-12-09 10:52:15 +0000
committeraclement <aclement>2005-12-09 10:52:15 +0000
commit0c8c0a3d21365eade6f53a0484bba71f24637a65 (patch)
treeefa8c4ba005882f172f1abfc9460adda738031c3 /tests/java5
parent5f8d2cdff480ac9d04cc73a4a69eb11563a0bb01 (diff)
downloadaspectj-0c8c0a3d21365eade6f53a0484bba71f24637a65.tar.gz
aspectj-0c8c0a3d21365eade6f53a0484bba71f24637a65.zip
Some updates for 118754. The various places that were checking for 'MISSING' now call 'isMissing' if they can. I think this negates some work Adrian did with introducing MissingWithKnownSignature - but we have to make this change for LTW to work properly. Someone with a bit of time on their hands should go through all the places isMissing() is now called and see if the check should be 'isReallyMissing()' which would allow the MissingWithKnownSignature to get through. I will raise an enhancement to cover this.
Diffstat (limited to 'tests/java5')
-rw-r--r--tests/java5/ataspectj/ajc-ant.xml8
-rw-r--r--tests/java5/ataspectj/ataspectj/Test$$EnhancerByCGLIB$$12345.java19
-rw-r--r--tests/java5/ataspectj/ataspectj/TestInterface.java16
-rw-r--r--tests/java5/ataspectj/ataspectj/TestProxyGenerator.java26
-rw-r--r--tests/java5/ataspectj/ataspectj/aop-dumpbeforeandafter.xml4
-rw-r--r--tests/java5/ataspectj/ataspectj/aop-dumpclosure.xml5
-rw-r--r--tests/java5/ataspectj/ataspectj/aop-dumpproxy.xml9
7 files changed, 84 insertions, 3 deletions
diff --git a/tests/java5/ataspectj/ajc-ant.xml b/tests/java5/ataspectj/ajc-ant.xml
index 5c4495be4..695e8ac07 100644
--- a/tests/java5/ataspectj/ajc-ant.xml
+++ b/tests/java5/ataspectj/ajc-ant.xml
@@ -60,6 +60,14 @@
</java>
</target>
+ <target name="ltw.DumpProxyTest">
+ <java fork="yes" classname="ataspectj.TestProxyGenerator" failonerror="yes">
+ <classpath refid="aj.path"/>
+ <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>
+ <jvmarg value="-Daj5.def=ataspectj/aop-dumpproxy.xml"/>
+ </java>
+ </target>
+
<target name="javac.ltw" depends="compile:javac, ltw"/>
<target name="ltw.Aspect2MainTest">
diff --git a/tests/java5/ataspectj/ataspectj/Test$$EnhancerByCGLIB$$12345.java b/tests/java5/ataspectj/ataspectj/Test$$EnhancerByCGLIB$$12345.java
new file mode 100644
index 000000000..78df5f1b1
--- /dev/null
+++ b/tests/java5/ataspectj/ataspectj/Test$$EnhancerByCGLIB$$12345.java
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * Matthew Webster - initial implementation
+ *******************************************************************************/
+package ataspectj;
+
+public class Test$$EnhancerByCGLIB$$12345 {
+
+ public static void main(String[] args) {
+ System.out.println("Test$$EnhancerByCGLIB$$12345.main()");
+ }
+
+}
diff --git a/tests/java5/ataspectj/ataspectj/TestInterface.java b/tests/java5/ataspectj/ataspectj/TestInterface.java
new file mode 100644
index 000000000..beac1461b
--- /dev/null
+++ b/tests/java5/ataspectj/ataspectj/TestInterface.java
@@ -0,0 +1,16 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * Matthew Webster - initial implementation
+ *******************************************************************************/
+package ataspectj;
+
+public interface TestInterface {
+
+ public void testMethod ();
+}
diff --git a/tests/java5/ataspectj/ataspectj/TestProxyGenerator.java b/tests/java5/ataspectj/ataspectj/TestProxyGenerator.java
new file mode 100644
index 000000000..1dc0e9aac
--- /dev/null
+++ b/tests/java5/ataspectj/ataspectj/TestProxyGenerator.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * Matthew Webster - initial implementation
+ *******************************************************************************/
+package ataspectj;
+
+import java.lang.reflect.Proxy;
+
+public class TestProxyGenerator implements TestInterface {
+
+ public void testMethod() {
+ }
+
+ public static void main(String[] args) {
+ Class clazz = TestProxyGenerator.class;
+ Class proxyClazz = Proxy.getProxyClass(clazz.getClassLoader(),new Class[] { TestInterface.class});
+ System.out.println("TestProxyGenerator.main() proxyClazz=" + proxyClazz + ", proxyClassLoader=" + proxyClazz.getClassLoader());
+ }
+
+}
diff --git a/tests/java5/ataspectj/ataspectj/aop-dumpbeforeandafter.xml b/tests/java5/ataspectj/ataspectj/aop-dumpbeforeandafter.xml
index c2824e2be..487d5dd62 100644
--- a/tests/java5/ataspectj/ataspectj/aop-dumpbeforeandafter.xml
+++ b/tests/java5/ataspectj/ataspectj/aop-dumpbeforeandafter.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<aspectj>
- <weaver options="-XmessageHandlerClass:ataspectj.TestHelper">
- <dump within="ataspectj.DumpTestThe*" beforeandafter="true"/>
+ <weaver options="-verbose">
+ <dump within="ataspectj..*" beforeandafter="true"/>
</weaver>
</aspectj>
diff --git a/tests/java5/ataspectj/ataspectj/aop-dumpclosure.xml b/tests/java5/ataspectj/ataspectj/aop-dumpclosure.xml
index d73c1c23b..fdee559eb 100644
--- a/tests/java5/ataspectj/ataspectj/aop-dumpclosure.xml
+++ b/tests/java5/ataspectj/ataspectj/aop-dumpclosure.xml
@@ -4,6 +4,9 @@
<aspect name="ataspectj.TestAroundAspect"/>
</aspects>
<weaver options="-Xnoinline">
- <dump within="ataspectj.DumpTestThe*" beforeandafter="true"/>
+ <dump within="ataspectj..*Closure*"/>
+<!--
+ <dump within="*"/>
+-->
</weaver>
</aspectj>
diff --git a/tests/java5/ataspectj/ataspectj/aop-dumpproxy.xml b/tests/java5/ataspectj/ataspectj/aop-dumpproxy.xml
new file mode 100644
index 000000000..1a76c0152
--- /dev/null
+++ b/tests/java5/ataspectj/ataspectj/aop-dumpproxy.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<aspectj>
+ <weaver>
+<!--
+ <dump within="*..*Proxy*" beforeandafter="true"/>
+-->
+ <dump within="*Proxy*" beforeandafter="true"/>
+ </weaver>
+</aspectj>