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

Remove old JDK backwards compatibility classes #3976

Closed
wants to merge 2 commits into from
Closed

Remove old JDK backwards compatibility classes #3976

wants to merge 2 commits into from

Conversation

mszabo-wikia
Copy link
Contributor

@mszabo-wikia mszabo-wikia commented Oct 31, 2018

The ConcurrentHashMapV8 class is simply the implementation of java.util.concurrent.ConcurrentHashMap, as found in Java 8 and above. It seems it was added to the source to allow older JDK versions to take advantage of its more efficient implementation. However, since version 2.26, Jersey only supports Java 8 and above, therefore this class should no longer be needed and java.util.concurrent.ConcurrentHashMap can be used instead. This also has the advantage of removing some sun.misc.Unsafe usages from Jersey proper.

Similarly there was a LinkedTransferQueue implementation for Java 6 and older. I've removed this too, and the JdkVersion utility class (which was also not ready to support Java 11 version strings) along with it.

Signed-off-by: mszabo-wikia [email protected]

@mszabo-wikia mszabo-wikia changed the title Remove ConcurrentHashMapV8 and usages Remove old JDK backwards compatibility classes Oct 31, 2018
@mszabo-wikia
Copy link
Contributor Author

Not sure if the test failure is related—it passed on the first commit as well as on OpenJDK 8.

@jansupol
Copy link
Contributor

jansupol commented Oct 31, 2018

While you are right that the jdk 8 is minimum and we can remove some older collection classes, we definitely cannot remove public classes/method.

@jansupol
Copy link
Contributor

Also, I assume we will have some use of the JdkVersion class, in trasition to jdk 9, where we will get rid of the usage of Unsafe class.

@jansupol
Copy link
Contributor

I incline to keep the factory methods even when they return directly the new instance of a single class.

@jansupol jansupol closed this Oct 31, 2018
@mszabo-wikia
Copy link
Contributor Author

@jansupol thanks! I'll prepare a new PR that avoids breaking BC & extend JdkVersion to support modern Java version strings.

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

Successfully merging this pull request may close these issues.

None yet

2 participants