ben-manes / concurrentlinkedhashmap

A ConcurrentLinkedHashMap for Java
Apache License 2.0
470 stars 113 forks source link

Java 9 compatibility #48

Closed hakanai closed 6 years ago

hakanai commented 8 years ago

concurrentlinkedhashmap-lru shows up in a jdeps report of classes that will stop working on Java 9:

concurrentlinkedhashmap-lru-1.4.1.jar
   com.googlecode.concurrentlinkedhashmap (concurrentlinkedhashmap-lru-1.4.1.jar)                                            
      -> sun.misc                                           JDK internal API (rt.jar)
ben-manes commented 8 years ago

In v1.4, I embedded Doug's backport of the JDK8 ConcurrentHashMap which has faster performance. However the library can be rebuilt without it easily enough to use the JDK's, as Unsafe is not used otherwise.

I'm hesitant to do anything and instead prefer users migrate to Caffeine.

hakanai commented 8 years ago

Yeah. Certainly if I find which library is using this jar, I will go to them and ask them to switch anyway.

ben-manes commented 8 years ago

Worst case you can make a custom jar and replace the dependency in your build. Its trivial enough that the Redhat guys did that in #44. But it shouldn't be a problem until JDK10.

ben-manes commented 6 years ago

JDK11 will still have Unsafe, so probably won't be gone until JDK17 (3 yr LTS schedule).