]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix VaadinFinderLocatorStrategy result filtering (#13154)
authorTeemu Suo-Anttila <teemusa@vaadin.com>
Wed, 8 Jan 2014 14:00:55 +0000 (16:00 +0200)
committerTeemu Suo-Anttila <teemusa@vaadin.com>
Wed, 8 Jan 2014 14:00:55 +0000 (16:00 +0200)
Change-Id: Ia59fbd4fc5d784423c2fc4da4ed19b81723d6de4

client/src/com/vaadin/client/componentlocator/VaadinFinderLocatorStrategy.java

index 6337ca7e8c3455fa5c3e9232baaf8c5cbf6dea9e..2bb08a52c918cecc6c1f0d4f0d3549b3cfaea068 100644 (file)
@@ -410,15 +410,13 @@ public class VaadinFinderLocatorStrategy implements LocatorStrategy {
 
         String[] fragments = splitFirstFragmentFromTheRest(path);
 
-        List<ComponentConnector> potentialMatches = new ArrayList<ComponentConnector>();
+        List<ComponentConnector> connectors = new ArrayList<ComponentConnector>();
         for (ComponentConnector parent : parents) {
-            potentialMatches.addAll(collectPotentialMatches(parent,
-                    fragments[0], findRecursively));
+            connectors.addAll(filterMatches(
+                    collectPotentialMatches(parent, fragments[0],
+                            findRecursively), extractPredicates(fragments[0])));
         }
 
-        List<ComponentConnector> connectors = filterMatches(potentialMatches,
-                extractPredicates(fragments[0]));
-
         if (!connectors.isEmpty() && fragments.length > 1) {
             return (findConnectorsByPath(fragments[1], connectors));
         }