Java 9 Unsafe resolution - Oracle backs down
We recently published an article concerning Oracle's plans to remove
sun.misc.Unsafe from Java 9 and the terrible impact it could have. The article got extremely popular and started a huge amount of discussions in the Java community.
Today, we are please to report that Oracle has heard our concerns and has now decided to leave
Unsafe accessible in Java 9!
Here are some quotes from their mailing-list announcement.
They understand how important
Unsafe is to Java.
It's well-known that some popular libraries make use of a few of these internal APIs, such as sun.misc.Unsafe, to invoke methods that would be difficult, if not impossible, to implement outside of the JDK.
... and they will leave it alone in Java 9.
If it does not have a supported replacement in JDK 8 then we will not encapsulate it in JDK 9, so that it remains accessible to outside code
Several prominent Java figures have voiced their approval of the plan. Richard Warburton termed it a 'pragmatic compromise':
Its great to hear that this pragmatic compromise is being adopted.
While we had hoped Oracle would also take this opportunity to document
Unsafe and at the same time provide a new set of classes that expose its functionality in a safer way, we are overall pleased with this decision.
We are glad that we were able to voice this issue and be of help to the Java community. Thanks to everyone who helped spread the spread.