diff options
author | avasseur <avasseur> | 2005-05-30 10:00:21 +0000 |
---|---|---|
committer | avasseur <avasseur> | 2005-05-30 10:00:21 +0000 |
commit | f14646f57a93e7ec865416048c4491d9943064e5 (patch) | |
tree | ad79eab1c3e336ca62b973d30e2fe7613cd997d6 | |
parent | d60e26a239d60ed0a2f2beab51c8a890c748360e (diff) | |
download | aspectj-f14646f57a93e7ec865416048c4491d9943064e5.tar.gz aspectj-f14646f57a93e7ec865416048c4491d9943064e5.zip |
#96371 META-INF/aop.xml lookup fix + test
-rw-r--r-- | loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java | 4 | ||||
-rw-r--r-- | loadtime5/java5-src/org/aspectj/weaver/loadtime/ClassPreProcessorAgentAdapter.java | 3 | ||||
-rw-r--r-- | tests/java5/ataspectj/ajc-ant.xml | 5 | ||||
-rw-r--r-- | tests/java5/ataspectj/ataspectj/SingletonAspectBindingsTest.java | 7 | ||||
-rw-r--r-- | tests/java5/ataspectj/ataspectj/pathentry/META-INF/aop.xml (renamed from tests/java5/ataspectj/ataspectj/aop.xml) | 0 |
5 files changed, 6 insertions, 13 deletions
diff --git a/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java b/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java index f41041332..b3e361ada 100644 --- a/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java +++ b/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java @@ -40,6 +40,8 @@ import org.aspectj.weaver.tools.WeavingAdaptor; */ public class ClassLoaderWeavingAdaptor extends WeavingAdaptor { + private final static String AOP_XML = "META-INF/aop.xml"; + //ATAJ LTW include/exclude private List m_includeTypePattern = new ArrayList(); private List m_excludeTypePattern = new ArrayList(); @@ -106,7 +108,7 @@ public class ClassLoaderWeavingAdaptor extends WeavingAdaptor { private void registerDefinitions(final BcelWeaver weaver, final ClassLoader loader) { try { //TODO av underoptimized: we will parse each XML once per CL that see it - Enumeration xmls = loader.getResources("/META-INF/aop.xml"); + Enumeration xmls = loader.getResources(AOP_XML); List definitions = new ArrayList(); //TODO av dev mode needed ? TBD -Daj5.def=... diff --git a/loadtime5/java5-src/org/aspectj/weaver/loadtime/ClassPreProcessorAgentAdapter.java b/loadtime5/java5-src/org/aspectj/weaver/loadtime/ClassPreProcessorAgentAdapter.java index 9e81bd13d..b292452a4 100644 --- a/loadtime5/java5-src/org/aspectj/weaver/loadtime/ClassPreProcessorAgentAdapter.java +++ b/loadtime5/java5-src/org/aspectj/weaver/loadtime/ClassPreProcessorAgentAdapter.java @@ -11,9 +11,6 @@ *******************************************************************************/ package org.aspectj.weaver.loadtime; -import org.aspectj.weaver.loadtime.Aj; -import org.aspectj.weaver.loadtime.ClassPreProcessor; - import java.lang.instrument.ClassFileTransformer; import java.lang.instrument.IllegalClassFormatException; import java.security.ProtectionDomain; diff --git a/tests/java5/ataspectj/ajc-ant.xml b/tests/java5/ataspectj/ajc-ant.xml index ce5351563..b7a09cf0a 100644 --- a/tests/java5/ataspectj/ajc-ant.xml +++ b/tests/java5/ataspectj/ajc-ant.xml @@ -1,5 +1,5 @@ <!-- ajc-ant script, not to be used from Ant commant line - see AntSpec --> -<project name="foo" default="javac.ltw"> +<project name="ltw" default="javac.ltw"> <!-- using this we can debug the forked VM --> <property @@ -18,8 +18,9 @@ <target name="ltw"> <java fork="yes" classname="ataspectj.AllLTWTests" failonerror="yes"> <classpath refid="aj.path"/> + <!-- use META-INF/aop.xml style --> + <classpath path="ataspectj/pathentry"/> <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/> - <jvmarg value="-Daj5.def=ataspectj/aop.xml"/> </java> </target> diff --git a/tests/java5/ataspectj/ataspectj/SingletonAspectBindingsTest.java b/tests/java5/ataspectj/ataspectj/SingletonAspectBindingsTest.java index 47e2470b2..27ce636b4 100644 --- a/tests/java5/ataspectj/ataspectj/SingletonAspectBindingsTest.java +++ b/tests/java5/ataspectj/ataspectj/SingletonAspectBindingsTest.java @@ -15,15 +15,8 @@ import org.aspectj.lang.annotation.Before; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.After; import org.aspectj.lang.annotation.Around; -import org.aspectj.lang.annotation.DeclarePrecedence; -import org.aspectj.lang.annotation.After; -import org.aspectj.lang.annotation.Around; -import org.aspectj.lang.annotation.Before; -import org.aspectj.lang.annotation.Before; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.ProceedingJoinPoint; -import org.aspectj.lang.ProceedingJoinPoint; -import org.aspectj.runtime.internal.AroundClosure; import junit.framework.TestCase; /** diff --git a/tests/java5/ataspectj/ataspectj/aop.xml b/tests/java5/ataspectj/ataspectj/pathentry/META-INF/aop.xml index 365cd5d17..365cd5d17 100644 --- a/tests/java5/ataspectj/ataspectj/aop.xml +++ b/tests/java5/ataspectj/ataspectj/pathentry/META-INF/aop.xml |