]> source.dussan.org Git - gwtquery.git/commitdiff
JSONObjects are safe objects 51/1951/1
authorManuel Carrasco Moñino <manuel.carrasco.m@gmail.com>
Sun, 9 Feb 2014 09:28:32 +0000 (10:28 +0100)
committerManuel Carrasco Moñino <manuel.carrasco.m@gmail.com>
Sun, 9 Feb 2014 09:28:32 +0000 (10:28 +0100)
gwtquery-core/src/main/java/com/google/gwt/query/vm/JsonFactoryJre.java

index 80881507e2360d0cef579b2c7963ca8c49583e62..ee9c4d22dd46f650074a787236920add875bee92 100644 (file)
@@ -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);