]> source.dussan.org Git - aspectj.git/commitdiff
298786: non-optimal exclude pattern issue
authoraclement <aclement>
Tue, 5 Jan 2010 00:44:36 +0000 (00:44 +0000)
committeraclement <aclement>
Tue, 5 Jan 2010 00:44:36 +0000 (00:44 +0000)
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java

index 694e7afb57abe1f41bf559d829717d5350d5fac5..d531105bde4ae1122d5646b609909c30dc1fe1d7 100644 (file)
@@ -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);