diff options
author | Manuel Carrasco Moñino <manuel.carrasco.m@gmail.com> | 2012-11-30 13:30:59 +0100 |
---|---|---|
committer | Manuel Carrasco Moñino <manuel.carrasco.m@gmail.com> | 2012-11-30 13:30:59 +0100 |
commit | e86721c8825d35f88359aea796c8ba41ac7299a1 (patch) | |
tree | e316c1a19e452ed8c769d5cc0e4b32ab626cbd98 /gwtquery-core/src | |
parent | 1313f0c0286cc31edf9874cedeb44f8689e7d0d0 (diff) | |
download | gwtquery-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.java | 4 |
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++){ |