[Java] Fix support for 'class' properties in Java codegen#4237
Merged
wing328 merged 2 commits intoswagger-api:masterfrom Nov 22, 2016
menchauser:master
Merged
[Java] Fix support for 'class' properties in Java codegen#4237wing328 merged 2 commits intoswagger-api:masterfrom menchauser:master
wing328 merged 2 commits intoswagger-api:masterfrom
menchauser:master
Conversation
added 2 commits
November 22, 2016 15:22
Currently Java codegen works successfully for property named 'class' but fails on '_class', '__class', etc, because of 'Object.getClass()' overloading. This fix is intended to avoid all Object method overloading cases.
Contributor
Author
|
Seems like I've broken existing tests by regenerating samples. |
Contributor
|
@menchauser thanks for the PR. Your suggested fix looks good to me. The enum issue caused by updated Java petstore sample is not related to the change you made. I'll look into it. |
3 tasks
Contributor
|
I fixed the test cases via #4329 This PR has been merged into master. Thanks for the contribution. |
This was referenced Mar 19, 2017
davidgri
pushed a commit
to davidgri/swagger-codegen
that referenced
this pull request
May 11, 2017
* Fix support for 'class' properties in Java codegen Currently Java codegen works successfully for property named 'class' but fails on '_class', '__class', etc, because of 'Object.getClass()' overloading. This fix is intended to avoid all Object method overloading cases. * Regenerated samples for Java petstore-security-test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently Java codegen works successfully for property named 'class' but
fails on '_class', '__class', etc, because of 'Object.getClass()'
overloading.
This fix is intended to avoid all Object method overloading cases.
Fix is similar to #3177
Resolves: #4236
(Sample code regeneration caused big changeset)