diff options
author | avasseur <avasseur> | 2005-07-28 10:15:26 +0000 |
---|---|---|
committer | avasseur <avasseur> | 2005-07-28 10:15:26 +0000 |
commit | 7b621acacf66dbfa12a1ae2da62e8fcbb2eaa64b (patch) | |
tree | bde23fabcfaeecf30fad8f0eeea38e0e292f97c9 /loadtime | |
parent | 878cb1939b40b060387d58044646a953ebc9920b (diff) | |
download | aspectj-7b621acacf66dbfa12a1ae2da62e8fcbb2eaa64b.tar.gz aspectj-7b621acacf66dbfa12a1ae2da62e8fcbb2eaa64b.zip |
fix corrupted test failing on Jrockit, fix a ltw doc, ltw include are ORed as per doc
Diffstat (limited to 'loadtime')
-rw-r--r-- | loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java b/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java index f018c0131..e3abb3f00 100644 --- a/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java +++ b/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java @@ -251,7 +251,7 @@ public class ClassLoaderWeavingAdaptor extends WeavingAdaptor { } //TODO AV - optimize for className.startWith only ResolvedType classInfo = weaver.getWorld().resolve(UnresolvedType.forName(className), true); - //exclude + //exclude are "AND"ed for (Iterator iterator = m_excludeTypePattern.iterator(); iterator.hasNext();) { TypePattern typePattern = (TypePattern) iterator.next(); if (typePattern.matchesStatically(classInfo)) { @@ -259,14 +259,17 @@ public class ClassLoaderWeavingAdaptor extends WeavingAdaptor { return false; } } + //include are "OR"ed + boolean accept = true;//defaults to true if no include for (Iterator iterator = m_includeTypePattern.iterator(); iterator.hasNext();) { TypePattern typePattern = (TypePattern) iterator.next(); - if (!typePattern.matchesStatically(classInfo)) { - // include does not match - skip - return false; + accept = typePattern.matchesStatically(classInfo); + if (accept) { + break; } + // goes on if this include did not match ("OR"ed) } - return true; + return accept; } private boolean acceptAspect(String aspectClassName) { @@ -276,7 +279,7 @@ public class ClassLoaderWeavingAdaptor extends WeavingAdaptor { } //TODO AV - optimize for className.startWith only ResolvedType classInfo = weaver.getWorld().resolve(UnresolvedType.forName(aspectClassName), true); - //exclude + //exclude are "AND"ed for (Iterator iterator = m_aspectExcludeTypePattern.iterator(); iterator.hasNext();) { TypePattern typePattern = (TypePattern) iterator.next(); if (typePattern.matchesStatically(classInfo)) { |