lz4-java icon indicating copy to clipboard operation
lz4-java copied to clipboard

Removing Java internal APIs from LZ4

Open severn-everett opened this issue 6 years ago • 1 comments
trafficstars

JDeps is reporting the usage of sun.misc.Unsafe (i.e. in UnsafeUtils.java) that is causing issues with our build process. Has there been any investigation into replacing this in the LZ4 library? On one hand, this would cause compatibility issues with version <9 JVMs, as the suggested replacement - VarHandle - isn't available until Java 9; on the other hand, this would help future-proof the library in case Oracle decides to make compatibility-breaking changes to sun.misc.Unsafe (or yank it from the JDK outright).

severn-everett avatar Sep 17 '19 11:09 severn-everett

I don't have a plan to remove the usage of sun.misc.Unsafe in the near future as a critical component library like lz4-java must support older Java as much as possible, but I am also happy to accept contributions to make lz4-java more compatible with newer versions of Java as long as support for older versions is somehow maintained.

odaira avatar Sep 17 '19 18:09 odaira