aboutsummaryrefslogtreecommitdiffstats
path: root/gwtquery-core/src
diff options
context:
space:
mode:
authorManuel Carrasco Moñino <manuel.carrasco.m@gmail.com>2012-11-30 13:30:59 +0100
committerManuel Carrasco Moñino <manuel.carrasco.m@gmail.com>2012-11-30 13:30:59 +0100
commite86721c8825d35f88359aea796c8ba41ac7299a1 (patch)
treee316c1a19e452ed8c769d5cc0e4b32ab626cbd98 /gwtquery-core/src
parent1313f0c0286cc31edf9874cedeb44f8689e7d0d0 (diff)
downloadgwtquery-e86721c8825d35f88359aea796c8ba41ac7299a1.tar.gz
gwtquery-e86721c8825d35f88359aea796c8ba41ac7299a1.zip
Check filter parameter to avoid out of bound exception, issue seem in jsquery
Diffstat (limited to 'gwtquery-core/src')
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java
index caf188f1..f24f0672 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java
@@ -2143,6 +2143,10 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
*/
// TODO performance bad...
public GQuery filter(String... filters) {
+ if (filters.length == 0 || filters[0] == null) {
+ return this;
+ }
+
JsNodeArray array = JsNodeArray.create();
/*
* StringBuilder filterBuilder = new StringBuilder(); for (int i = 0; i < filters.length ; i++){