Skip to content
This repository has been archived by the owner on Mar 21, 2022. It is now read-only.

start requiring Java 8? #756

Closed
mattnworb opened this issue May 22, 2017 · 10 comments · Fixed by #1081
Closed

start requiring Java 8? #756

mattnworb opened this issue May 22, 2017 · 10 comments · Fixed by #1081
Labels
enhancement help wanted pinned exempt from being marked as stale

Comments

@mattnworb
Copy link
Member

Java 7 has been EOL since April 2015. Do we still need to support it in this library, i.e. compile for target=1.7 source=1.7?

The motivation for this question is that I started to use our hamcrest-jackson library in some unit tests in #753 but forgot that this library is built with Java 7 and hamcrest-jackson is built with 8.

Is there anyone using this that is stuck on 7 for some reason, or some other argument to be made against moving to compiling with 8?

@johnflavin
Copy link
Contributor

My application is still on java 7. We plan to move to java 8 at some point, but it is never the top priority.

However, I wouldn't want you to hold up progress on my account. My needs are well served by the existing functionality in docker-client, so if I had to depend on an older version that supported java 7 it wouldn't bother me.

@mattnworb
Copy link
Member Author

We could also explore building for both 7 and 8, using some maven profile magic, and upload both to Maven Central (with a classifier for one of jdk8 or jdk7).

At this point all I am really after is being able to use some 8-only libraries in tests, and not using 8 language features or standard library classes, so perhaps it would be enough to run tests with jdk8 (to allow classes compiled for 8 to load) but build for 7 only (source/target=7 should catch use of 8 language features, but not catch use of 8 classes like Stream etc AFAIK).

@davidxia
Copy link
Contributor

I'm fine with using 8 for tests only. It'd be nice to just build new versions for 8 as well, but I'm not sure how many people will complain.

@mattnworb
Copy link
Member Author

Another bonus of using Java 8 is I think we could convert all usages of ListenableFuture to CompletableFuture and possibly ditch the Guava dependency altogether.

@hekonsek
Copy link

Keep in mind that some of your dependencies (like Jersey #915) has already moved to Java8. In practice that would mean that you can't upgrade those dependencies as long as you stick to Java 7. Also some other libraries which happen to use those latest, Java8-based versions of dependencies will be conflicting with docker-client. Please do consider upgrading to Java8. :)

@mattnworb
Copy link
Member Author

I happened to notice today that Oracle will end public updates to Java SE 8 in September 2018, so with less than one year left of real "life", I think it is overdue to set this as a minimum version.

@diemol
Copy link
Contributor

diemol commented Dec 5, 2017

Can we help with this? I am running often to something similar to #877, and it would be nice to start updating the dependencies.
What about building with Java 8 first and increment the dependencies one by one? Please let me know how we can contribute.

@mattnworb
Copy link
Member Author

@diemol that sounds like exactly the plan I would take myself, so if you want to start any of that in a PR that would be awesome!

@diemol
Copy link
Contributor

diemol commented Dec 6, 2017

Sure, I'll give it a try to see how much I can advance. My project relies heavily on this one and giving a hand is the least I could do.

What is better for you? Opening a PR with a [WIP] status, or I could also setup Travis for my fork.

@stale
Copy link

stale bot commented Sep 24, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Sep 24, 2018
@davidxia davidxia added enhancement help wanted pinned exempt from being marked as stale and removed stale labels Sep 24, 2018
davidxia added a commit that referenced this issue Oct 2, 2018
davidxia added a commit that referenced this issue Oct 2, 2018
Set Travis CI JDK to `oraclejdk8`.

fixes #756
davidxia added a commit that referenced this issue Oct 2, 2018
Set Travis CI JDK to `oraclejdk8`.

fixes #756
davidxia added a commit that referenced this issue Oct 2, 2018
to prepare for Java 8.
JAR should still be compatible with JRE 1.7.

Set Travis CI JDK to `oraclejdk8`.

fixes #756
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement help wanted pinned exempt from being marked as stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants