http://gwt-code-reviews.appspot.com/1622803/diff/6001/user/src/com/google/web/bindery/requestfactory/shared/DefaultProxyStore.java File user/src/com/google/web/bindery/requestfactory/shared/DefaultProxyStore.java (right):
http://gwt-code-reviews.appspot.com/1622803/diff/6001/user/src/com/google/web/bindery/requestfactory/shared/DefaultProxyStore.java#newcode71 user/src/com/google/web/bindery/requestfactory/shared/DefaultProxyStore.java:71: nextId = map.size(); On 2012/05/23 19:27:46, skybrian wrote:
Initializing from map.size() might be a reasonable thing to for
backward
compatibility with a previous version of DefaultProxyStore, but for
the current
version, it seems like we should actually be serializing the nextId
field and
restoring it?
Would you mind using the syntheticId or clientId properties of the OperationMessage for that? Or you think a new bean type (and factory) should be created? (the use OperationMessage here can already be seen as a "hack", kind of, because all we need is a Map<String,Splittable> for the storage, and a String for the version; so using another field in some "diverted" way is not really a problem I think)
So EXPECTED_VERSION probably needs to be bumped up and the protocol changed?
I don't think it's necessary. We could use the stored ID if provided and fallback to map.size() for backwards compatibility. Or we could bump the EXPECTED_VERSION but have a backward-compatible initialization: if the version is "211", then initialize nextId with map.size(), otherwise if it's EXPECTED_VERSION (would be "250" or "251") then use the version stored in the OperationMessage's syntheticId or clientId. http://gwt-code-reviews.appspot.com/1622803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors