When encoding the payload, make sure that we're using the JSONified version of the object with non-collection encodes; otherwise we'll end up encoding a String as [Object] in web mode. Also remove the toString() on JsonSplittable; the proper implementation of toString allowed the encoding to work in dev mode but not web mode. Review at http://gwt-code-reviews.appspot.com/1628803 git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@10835 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/src/com/google/web/bindery/autobean/vm/impl/JsonSplittable.java b/user/src/com/google/web/bindery/autobean/vm/impl/JsonSplittable.java index 913b50d..c8059a5 100644 --- a/user/src/com/google/web/bindery/autobean/vm/impl/JsonSplittable.java +++ b/user/src/com/google/web/bindery/autobean/vm/impl/JsonSplittable.java
@@ -285,14 +285,6 @@ return array.length(); } - /** - * For debugging use only. - */ - @Override - public String toString() { - return getPayload(); - } - private synchronized JsonSplittable makeSplittable(Object object) { if (JSONObject.NULL.equals(object)) { return null;
diff --git a/user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java b/user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java index 28bbb8f..8662756 100644 --- a/user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java +++ b/user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java
@@ -271,11 +271,11 @@ sb.append("["); if (it.hasNext()) { // TODO: Allow for the encoding of nested collections. See issue 5974. - sb.append(nonCollectionEncode(it.next())); + sb.append(nonCollectionEncode(it.next()).getPayload()); while (it.hasNext()) { sb.append(","); // TODO: Allow for the encoding of nested collections. See issue 5974. - sb.append(nonCollectionEncode(it.next())); + sb.append(nonCollectionEncode(it.next()).getPayload()); } } sb.append("]");