The Secret History and Tragic Fate of sun.misc.Unsafe
summary
Chronicles why sun.misc.Unsafe exists, lists concrete uses (reflection rewrite in Java 1.4, direct buffers, JSR‑166 atomic/park/unpark, BigInteger speedups, Objective‑C bridge), and gives hard numbers — 379 results on StackOverflow — to show widespread misuse. Explains the JDK9 plan: module encapsulation, available on classpath, opt‑in for modules, command‑line override, and a release-by-release migration/deprecation rule that moves unsafe methods into supported safer APIs or removes them.
AI-written summary · about
chapters (10)
- 0:00The history of Unsafe
- 3:07Roadblocks and workarounds
- 3:41The role of Unsafe in ecosystems
- 5:03Benefits of external adoption
- 5:19The burden of maintenance
- 6:20Abuse and misuse
- 6:35Security and stability risks
- 7:17The cycle of dependency
- 7:27Jigsaw and modularization
- 10:16The plan for removal
related talks
46mUnsafe (and Java 9/10) (RU)
49mA Post Apocalyptic sun misc Unsafe World
51mJava - Integrity by Default
50mSafely Shoot Yourself in the Foot with Java 9
51mPrepare for JDK 9
47mJDK 9, 10, and 11: Pitfalls for the Unwary
48mSafely Shoot Yourself in the Foot with Java 9
41mFrom Cowboy Mode to Careful Stewardship
