From 87652c5642d70c029d9a4e6e31123dbfbc9ac040 Mon Sep 17 00:00:00 2001 From: Teemu Suo-Anttila Date: Wed, 8 Jan 2014 16:00:55 +0200 Subject: [PATCH] Fix VaadinFinderLocatorStrategy result filtering (#13154) Change-Id: Ia59fbd4fc5d784423c2fc4da4ed19b81723d6de4 --- .../componentlocator/VaadinFinderLocatorStrategy.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/client/src/com/vaadin/client/componentlocator/VaadinFinderLocatorStrategy.java b/client/src/com/vaadin/client/componentlocator/VaadinFinderLocatorStrategy.java index 6337ca7e8c..2bb08a52c9 100644 --- a/client/src/com/vaadin/client/componentlocator/VaadinFinderLocatorStrategy.java +++ b/client/src/com/vaadin/client/componentlocator/VaadinFinderLocatorStrategy.java @@ -410,15 +410,13 @@ public class VaadinFinderLocatorStrategy implements LocatorStrategy { String[] fragments = splitFirstFragmentFromTheRest(path); - List potentialMatches = new ArrayList(); + List connectors = new ArrayList(); for (ComponentConnector parent : parents) { - potentialMatches.addAll(collectPotentialMatches(parent, - fragments[0], findRecursively)); + connectors.addAll(filterMatches( + collectPotentialMatches(parent, fragments[0], + findRecursively), extractPredicates(fragments[0]))); } - List connectors = filterMatches(potentialMatches, - extractPredicates(fragments[0])); - if (!connectors.isEmpty() && fragments.length > 1) { return (findConnectorsByPath(fragments[1], connectors)); } -- 2.39.5