Skip to content
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

Closed
r3use opened this issue Feb 13, 2015 · 4 comments
Closed

1.4: JsonSubTypes break GWT .cache.html files #232

r3use opened this issue Feb 13, 2015 · 4 comments

Comments

@r3use
Copy link
Contributor

r3use commented Feb 13, 2015

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.

@mkristian
Copy link
Member

mkristian commented Feb 13, 2015 via email

@r3use
Copy link
Contributor Author

r3use commented Feb 13, 2015

Sure.

Do you have any quality/style requirements for PRs?

@mkristian
Copy link
Member

mkristian commented Feb 13, 2015 via email

@r3use r3use mentioned this issue Feb 15, 2015
mkristian added a commit that referenced this issue Feb 20, 2015
@seamusmac
Copy link
Contributor

@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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants