From: Manuel Carrasco MoƱino Date: Fri, 30 Nov 2012 12:30:59 +0000 (+0100) Subject: Check filter parameter to avoid out of bound exception, issue seem in jsquery X-Git-Tag: release-1.3.2~34 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e86721c8825d35f88359aea796c8ba41ac7299a1;p=gwtquery.git Check filter parameter to avoid out of bound exception, issue seem in jsquery --- 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 { */ // 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++){