aboutsummaryrefslogtreecommitdiffstats
path: root/tests/ltw/ant.xml
diff options
context:
space:
mode:
authormwebster <mwebster>2006-10-02 10:00:33 +0000
committermwebster <mwebster>2006-10-02 10:00:33 +0000
commita6f716a82b8c218e3c07f432caca3d00828ac564 (patch)
tree7017ce47f0f1e36091b91e3f0dff77f494ff41c7 /tests/ltw/ant.xml
parent7ebbc9657a00e5288c69783be56aae1bb98369c4 (diff)
downloadaspectj-a6f716a82b8c218e3c07f432caca3d00828ac564.tar.gz
aspectj-a6f716a82b8c218e3c07f432caca3d00828ac564.zip
Bug 158205 "NullPointerException when weaving with bootstrap agent" (custom agent testcase)
Diffstat (limited to 'tests/ltw/ant.xml')
-rw-r--r--tests/ltw/ant.xml33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/ltw/ant.xml b/tests/ltw/ant.xml
index db38cb16a..c7f5cc26c 100644
--- a/tests/ltw/ant.xml
+++ b/tests/ltw/ant.xml
@@ -5,6 +5,7 @@
<property
name="jdwp"
value="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"/>
+ <property name="aj.bootpath" refid="aj.path"/>
<target name="JDK14 LTW with XML">
<java fork="yes" classname="HelloWorld" failonerror="yes">
@@ -67,4 +68,36 @@
</java>
</target>
+ <!-- Beware, this is complicated! We need to intercept class loading on
+ the System class loader before any classes are loaded. We do this
+ by replacing the URLClassLoader. We then define a custom
+ SecurityManager that will be loaded _before_ the class loader
+ hierarch is fully initialized. -->
+ <target name="NPE with custom agent">
+ <java fork="yes" classname="HelloWorld" failonerror="yes">
+
+ <!-- Prepend custom URLClassLoader and append AspectJ
+ to bootclasspath -->
+ <jvmarg value="-Xbootclasspath/p:${aj.sandbox}"/>
+ <jvmarg value="-Xbootclasspath/a:${aj.bootpath}"/>
+
+ <classpath>
+ <pathelement path="${aj.sandbox}/hello.jar:${aj.sandbox}/handler.jar:${aj.sandbox}/security.jar"/>
+ </classpath>
+
+ <!-- Specify custom SecurityManager that will be loaded
+ and woven very early -->
+ <jvmarg value="-Djava.security.manager=NullSecurityManager"/>
+
+ <jvmarg value="-Daj.weaving.verbose=true"/>
+ <jvmarg value="-Dorg.aspectj.weaver.showWeaveInfo=true"/>
+
+<!--
+ <jvmarg value="-Dorg.aspectj.tracing.enabled=true"/>
+ <jvmarg value="-Dorg.aspectj.tracing.factory=default"/>
+ <jvmarg value="-Dorg.aspectj.tracing.messages=true"/>
+-->
+ </java>
+ </target>
+
</project>