From f67b7578fa54ffdd810693011ea942b140aa44b4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Manuel=20Carrasco=20Mo=C3=B1ino?= Date: Sun, 9 Feb 2014 10:28:32 +0100 Subject: [PATCH] JSONObjects are safe objects --- .../src/main/java/com/google/gwt/query/vm/JsonFactoryJre.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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); -- 2.39.5