From: Manuel Carrasco MoƱino Date: Sun, 9 Feb 2014 09:28:32 +0000 (+0100) Subject: JSONObjects are safe objects X-Git-Tag: gwtquery-project-1.4.3~42^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f67b7578fa54ffdd810693011ea942b140aa44b4;p=gwtquery.git JSONObjects are safe objects --- diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/vm/JsonFactoryJre.java b/gwtquery-core/src/main/java/com/google/gwt/query/vm/JsonFactoryJre.java index 80881507..ee9c4d22 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/vm/JsonFactoryJre.java +++ b/gwtquery-core/src/main/java/com/google/gwt/query/vm/JsonFactoryJre.java @@ -16,7 +16,6 @@ import org.json.JSONObject; import com.google.gwt.query.client.IsProperties; import com.google.gwt.query.client.Function; -import com.google.gwt.query.client.GQ; import com.google.gwt.query.client.Properties; import com.google.gwt.query.client.builders.JsonBuilder; import com.google.gwt.query.client.builders.JsonFactory; @@ -148,7 +147,7 @@ public class JsonFactoryJre implements JsonFactory { JSONArray a = listToJsonArray(arg); return obj != null ? obj.put(attr, a) : arr.put(a); } else { - if (!(o instanceof Function)) { + if (!(o instanceof Function) && !(o instanceof JSONObject)) { System.out.println("Unkown setter object " + attr + " " + o.getClass().getName() + " " + o); } return obj != null ? obj.put(attr, o) : arr.put(o);