Using the library on some Android versions results in following Error:
java.lang.NoSuchMethodError: No virtual method getByte(Ljava/lang/Object;J)B in class Lsun/misc/Unsafe; or its super classes (declaration of 'sun.misc.Unsafe' appears in /system/framework/core-libart.jar)
at net.openhft.hashing.LongHashFunction.<clinit>(LongHashFunction.java:73)
It does work on Android 7. It seems, older Android versions do not implement full functionality of Unsafe.
Considering that Unsafe is likely to be replaced/killed off in future versions of mainline Java, you should probably move all related static constants into the UnsafeAccess and add some handling for situations when it is not available.
Using the library on some Android versions results in following Error:
It does work on Android 7. It seems, older Android versions do not implement full functionality of Unsafe.
Considering that Unsafe is likely to be replaced/killed off in future versions of mainline Java, you should probably move all related static constants into the UnsafeAccess and add some handling for situations when it is not available.