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][Jersey2] Add Java6 compatibility for Jersey2 #4033

Merged
merged 2 commits into from
Oct 19, 2016

Conversation

k1w1m8
Copy link
Contributor

@k1w1m8 k1w1m8 commented Oct 19, 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

Java6 compatibility is being added via supportJava6 option. This PR makes a small change to Jersey2 to replace usage of Java 7 class java.nio.file.Files with reference to Apache commons.io.FileUtils.

I'm not sure exactly how to manage the additional dependency for commons io. Originally I saw it as part of swagger-codegen but of course that is only for the generation process. I doubt we want to add it as a dependency on the swagger runtime code, are you happy for it be up to users of supportJava6 to add manually?

@wing328
Copy link
Contributor

wing328 commented Oct 19, 2016

@k1w1m8 thanks! The change looks good to me.

@wing328 wing328 merged commit 60a52ee into swagger-api:master Oct 19, 2016
@wing328 wing328 added this to the v2.2.2 milestone Oct 19, 2016
@k1w1m8
Copy link
Contributor Author

k1w1m8 commented Oct 19, 2016

Great, thanks.

Are you happy for it be up to users of supportJava6 to add commons.io dependency manually? Is there somewhere we should document that?

@wing328
Copy link
Contributor

wing328 commented Oct 19, 2016

Ideally we should do it automatically in the pom.xml, build.gradle, sbt.build so as to save the developer's time.

@k1w1m8
Copy link
Contributor Author

k1w1m8 commented Oct 19, 2016

Ah yes, of course. Doh. Forgot we generated those too.

acramatte added a commit to comerge/swagger-codegen that referenced this pull request Oct 25, 2016
* upstream/master: (43 commits)
  [Java] BeanValidation + JAXRS CXF server generator (swagger-api#4068)
  update JS petstore samples
  nancyfx basePath => modulePath toggle (swagger-api#4053)
  Throw an Error object instead of a string
  [Qt5/C++] Arrays of primitive types fix (swagger-api#4046)
  fix NancyFX string parser (swagger-api#4048)
  Fix sanitizeTag to retain numbers and underscore in tag names
  add test for java6 jersey2 client
  hashCode and equals support for jdk6 for jersey2 (swagger-api#4039)
  update gitignore to include PetStore.pro.user
  increase timeout value for qt5 petstore test
  update undertow readme
  Java6 support for jersey2 (swagger-api#4033)
  [java] Allow setting test folder
  fix reserved word handling in model name (sinatra)
  better handling of reserved words for sintatra, dart
  improvements based on swagger-api#3568 (swagger-api#4021)
  [csharp] add missing anchor tags in readme (swagger-api#4019)
  Issue 3651 (swagger-api#4014)
  Added company (swagger-api#4015)
  ...
@wing328 wing328 changed the title Add Java6 compatibility for Jersey2 [Java][Jersey2] Add Java6 compatibility for Jersey2 Feb 20, 2017
davidgri pushed a commit to davidgri/swagger-codegen that referenced this pull request May 11, 2017
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.

2 participants