Andrei Pangin - Do we need Unsafe in Java? (Ru)

Java platform is highly appreciated for its security features: type safety, bounds checking, access control, automatic memory management, etc. The Virtual Machine provides a managed environment to guard applications from typical run-time problems. Today, however, more and more developers opt to break the barrier and escape from JVM sandbox. There is hardly a Senior Java developer who has never heard of . Though it has always been a private API intended for JDK internal use only, the popularity of Unsafe has grown too fast, and now it is used in many open-source projects. During this session we’ll try to understand what is so attractive about Unsafe. Why do people keep using it regardless the warnings of removal from future JDK releases? Are there any safe alternatives to private API or is it absolutely vital? We will review the typical cases when Java developers prefer to go unsafe and discuss major benefits and the drawbacks of it.
Back to Top