airlift / aircompressor

A port of Snappy, LZO, LZ4, and Zstandard to Java
Apache License 2.0
549 stars 110 forks source link

Remove dependency on sun.misc.Unsafe? #179

Closed javafanboy closed 8 months ago

javafanboy commented 8 months ago

As I understand it sun.misc.Unsafe is removed in JDK17 and later - I wonder if there is any plans to remove the use of this class in air compressor allowing it to be used with also the latest JDKs?

dain commented 8 months ago

Unsafe is still in the JVM (we are using 21), so this still works. That said, there is only limited unsafe usage in the newer versions, and we'd like to remove the last bits once the equivilent APIs are added to Java. This is described in the readme her https://github.com/airlift/slice#unsafe-usage