Roman,
I hope you are doing well.
I really appreciate the contributions you made to our Memory component!
Given that Druid has made its code base compatible with OpenJDK 11, we
could use your help in what changes do we need to make to make that happen
for DataSketches. As I recall, our DataSketches library was not the only
Druid dependency that took advantage of Unsafe. So I assume you have been
down this path :)
Currently, I have a check in the static initializer in Memory/UnsafeUtil:
parseJavaVersion(...) that checks the string returned from
System.getProperty("java.version"). If that string does not contain "1.8"
or "8" it will throw an error. Given that we have not tested with JDK 9,
10, 11 or 12, I felt it was safer to explicitly throw rather than having
the users experience some weird failure later that may be difficult to
debug.
With only one minor exception (which we could easily fix) the Memory
component is the only place where Unsafe is used. However, we do use
reflection to gain internal access to a number of other classes including
ByteBuffer, Cleaner, and Bits.
Looking forward to hearing from you.
Cheers,
Lee.