New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.4: JsonSubTypes break GWT .cache.html files #232
Comments
since you already found a solution - could you just prepare a PR request
for this. not sure how to automatically test this - so it really depends on
manually testing where you are THE person for it ;)
|
Sure. Do you have any quality/style requirements for PRs? |
no - not really. just do not reformat the whole file so the actual diff is
understandable ;)
|
Merged
mkristian
added a commit
that referenced
this issue
Feb 20, 2015
@mkristian I guess we can close this too :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you have a service with polymorphic parameters and several defined JsonSubTypes, GWT .cache.html files will change when recompiling the same source.
According to http://www.gwtproject.org/doc/latest/FAQ_DebuggingAndCompiling.html#What it should guaranteed that "if you recompile your application without changing code, the contents of the output will not change."
I tracked down the reason to class org.fusesource.restygwt.rebind.JsonEncoderDecoderClassCreator. findJsonSubType stores subtypes in a HashSet which does not guerantee any specific order of its content when iterating over it.
I think this issue is still present in newer versions of resty-gwt.
A possible solution is to sort the List returned by getPossibleTypes in the generate method of JsonEncoderDecoderClassCreator before generating the output.
The text was updated successfully, but these errors were encountered: