From a9688904c8041bd2bbb28817fbb82833522340c2 Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 5 Jan 2010 00:44:36 +0000 Subject: [PATCH] 298786: non-optimal exclude pattern issue --- .../loadtime/ClassLoaderWeavingAdaptor.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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); -- 2.39.5