Re:Removal of Unsafe in Java 9 – A disaster in the making
by orf on Monday July 13, 2015 @01:40PM
(#9879646)
Could you provide a link to the article? I'm not saying you're wrong (I'm not a Java guy) but that sounds convoluted.
Re:Removal of Unsafe in Java 9 – A disaster in the making
by twic on Monday July 13, 2015 @01:56PM
(#9879777)
This is how you get access to Unsafe:
Field theUnsafe = Unsafe.class.getDeclaredField("theUnsafe");
theUnsafe.setAccessible(true);
Unsafe unsafe = (Unsafe) theUnsafe.get(null);
Reflection, but no stack unwinding.
Normally when you go to that level of epic hackery, you can't expect for official support or backwards compatibility. So the author of this article using scare tactics to keep that feature seems rather disingenuous.