Out of curiosity: What do you use Unsafe.objectFieldOffset for that VarHandle is lacking functionality for?
It is useful to gather use cases not covered by VarHandle so that we can propose additional capabilities there (preparing for a world with no Unsafe in it). Can you share an example of code? As to your question: I assume it is Unsafe as a whole you are having issues with, and not just Unsafe.objectFieldOffset, is that correct? You can find examples of how to use Unsafe in a post-java-8 world e.g. here: http://gregluck.com/blog/archives/2017/03/using-sun-misc-unsafe-in-java-9/ On Tuesday, June 18, 2019 at 5:48:14 AM UTC-7, xiaobai andrew wrote: > > i usr Unsafe.objectFieldOffset in jdk 8 ,but when i want to update jdk to > 11, the idea compile error , it cannot found the symbol Unsafe. > i have try to find VarHandle api,but it did not > support Unsafe.objectFieldOffset > -- You received this message because you are subscribed to the Google Groups "mechanical-sympathy" group. To unsubscribe from this group and stop receiving emails from it, send an email to mechanical-sympathy+unsubscr...@googlegroups.com. To view this discussion on the web, visit https://groups.google.com/d/msgid/mechanical-sympathy/fd3d12a2-5f1d-4795-9e58-28723b8f02d7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.