aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManolo Carrasco <manolo@apache.org>2014-12-08 09:44:52 +0100
committerManolo Carrasco <manolo@apache.org>2014-12-08 09:45:57 +0100
commit66b26fdbeb5cf5ebc028c6f1fbffd2786ff72025 (patch)
tree403698c893616f90a5f7646aad45827d5cfe4725
parentb816dd0e4aa30d2a922b429496613d7e02a37804 (diff)
downloadgwtquery-66b26fdbeb5cf5ebc028c6f1fbffd2786ff72025.tar.gz
gwtquery-66b26fdbeb5cf5ebc028c6f1fbffd2786ff72025.zip
Replace arraylist by hashset in filter, which should improve better
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngine.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngine.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngine.java
index 6b6d5921..78b69e3e 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngine.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngine.java
@@ -17,8 +17,7 @@ package com.google.gwt.query.client.impl;
import static com.google.gwt.query.client.GQuery.*;
-import java.util.ArrayList;
-import java.util.List;
+import java.util.HashSet;
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.Document;
@@ -178,8 +177,8 @@ public class SelectorEngine implements HasSelector {
return res;
}
Element ghostParent = null;
- ArrayList<Node> parents = new ArrayList<Node>();
- List<Node> elmList = new ArrayList<Node>();
+ HashSet<Node> parents = new HashSet<Node>();
+ HashSet<Node> elmList = new HashSet<Node>();
for (int i = 0, l = nodes.getLength(); i < l; i++) {
Node e = nodes.getItem(i);
if (e == window || e == document || e.getNodeName() == null || "html".equalsIgnoreCase(e.getNodeName())) {