diff options
author | aclement <aclement> | 2010-01-05 00:44:36 +0000 |
---|---|---|
committer | aclement <aclement> | 2010-01-05 00:44:36 +0000 |
commit | a9688904c8041bd2bbb28817fbb82833522340c2 (patch) | |
tree | 6711e5adfad71bedeea8c7eb4faecc718ffe4a57 /loadtime | |
parent | 41960c59bf4744deeb6001ed308475b01b1baa70 (diff) | |
download | aspectj-a9688904c8041bd2bbb28817fbb82833522340c2.tar.gz aspectj-a9688904c8041bd2bbb28817fbb82833522340c2.zip |
298786: non-optimal exclude pattern issue
Diffstat (limited to 'loadtime')
-rw-r--r-- | loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java b/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java index 694e7afb5..d531105bd 100644 --- a/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java +++ b/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java @@ -815,6 +815,24 @@ public class ClassLoaderWeavingAdaptor extends WeavingAdaptor { } } // include are "OR"ed + if (includeStar) { + return true; + } + if (!includeExactName.isEmpty()) { + didSomeIncludeMatching = true; + for (String exactname : includeExactName) { + if (fastClassName.equals(exactname)) { + return true; + } + } + } + for (int i = 0; i < m_includeStartsWith.size(); i++) { + didSomeIncludeMatching = true; + boolean fastaccept = fastClassName.startsWith(m_includeStartsWith.get(i)); + if (fastaccept) { + return true; + } + } accept = !didSomeIncludeMatching; // only true if no includes at all for (TypePattern typePattern : includeTypePattern) { accept = typePattern.matchesStatically(classInfo); |