From 47a3b175d76558dd72d178bc28b1d5f5e3943691 Mon Sep 17 00:00:00 2001 From: Manuel Carrasco MoƱino Date: Sun, 9 Feb 2014 17:21:41 +0100 Subject: Return the String representation of the object like client sidei does --- gwtquery-core/src/main/java/com/google/gwt/query/vm/JsonFactoryJre.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ee9c4d22..76deabb2 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 @@ -67,7 +67,7 @@ public class JsonFactoryJre implements JsonFactory { } else if (clz.equals(Date.class)) { ret = new Date(obj != null ? obj.getLong(attr): arr.getLong(idx)); } else if (clz.equals(String.class)) { - ret = obj != null ? obj.getString(attr) : arr.getString(idx); + ret = String.valueOf(obj != null ? obj.get(attr) : arr.get(idx)); } else if (clz.equals(Boolean.class) || clz.isPrimitive() && clz == Boolean.TYPE) { try { ret = obj != null ? obj.getBoolean(attr): arr.getBoolean(idx); -- cgit v1.2.3