JDK 11 and proxies in a world past sun.misc.Unsafe

Read Original

This technical article discusses the deprecation and removal of the sun.misc.Unsafe.defineClass method in JDK 11, a change impacting code generation frameworks. It details the security risks of the old method and introduces the replacement API using MethodHandles.Lookup, which enforces module and package boundaries via the Java Platform Module System (JPMS). The post includes code examples and explains the implications for libraries like Byte Buddy.

JDK 11 and proxies in a world past sun.misc.Unsafe

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser