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

[Java][jersey1] add Java6 support to Java (jersey1) API client #3919

Merged
merged 3 commits into from
Oct 15, 2016

Conversation

wing328
Copy link
Contributor

@wing328 wing328 commented Oct 4, 2016

PR checklist

  • Read the contribution guildelines.
  • Ran the shell/batch script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh and ./bin/security/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates)
  • Filed the PR against the correct branch: master for non-breaking changes and 2.3.0 branch for breaking (non-backward compatible) changes.

Description of the PR

Add supportJava6 flag to remove equals and hashCode methods in the model as these methods are not compatible with Java6.

@wing328 wing328 added this to the v2.2.2 milestone Oct 4, 2016
@wing328 wing328 merged commit ce1cf46 into swagger-api:master Oct 15, 2016
@wing328 wing328 mentioned this pull request Oct 15, 2016
@wing328 wing328 deleted the java_16_support branch October 18, 2016 08:02
@k1w1m8
Copy link
Contributor

k1w1m8 commented Oct 19, 2016

If we wanted to keep the equals and hashcode methods for Java6, we could take the approach of replacing the java.util.Objects calls with the calls to other libraries which can do the same as we did for PR #4033 eg commons.lang or Guava.

@wing328
Copy link
Contributor Author

wing328 commented Oct 19, 2016

@k1w1m8 your suggestion sounds good to me.

davidgri pushed a commit to davidgri/swagger-codegen that referenced this pull request May 11, 2017
…er-api#3919)

* add java6 support to java jersey1

* properly handle boolean value in mustache tag

* add test for supportJava6 option
@ErnestoLazaroCorredera
Copy link

@ApiModelProperty in my model's class is not compatible with java 6:

java.lang.UnsupportedClassVersionError: io/swagger/annotations/ApiModelProperty : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants