commit | fa3a2e2a2e15d790984fbe6ba6bc235c800f1b6f | [log] [tgz] |
---|---|---|
author | rdayal@google.com <rdayal@google.com@8db76d5a-ed1c-0410-87a9-c151d255dfc7> | Thu Jan 19 16:11:34 2012 +0000 |
committer | rdayal@google.com <rdayal@google.com@8db76d5a-ed1c-0410-87a9-c151d255dfc7> | Thu Jan 19 16:11:34 2012 +0000 |
tree | 78ac4585bbb46db1c3af653621a8540bcaf19cc1 | |
parent | dd98e839235e30bd5588959fdc130414d615d073 [diff] |
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("]");