看了N多公眾號文章,全部都只是抄來抄去的,里面關于被禁接口的代替鏈接永遠都缺失,上官網(wǎng)扒了一份,大家湊合著看看吧
鑒于可能簡書對鏈接會攔截,我盡量搬過來吧……
| 被禁用的 | 推薦的 | 備注 |
|---|---|---|
| core-libs | ||
| protected java.lang.ClassLoader::defineClass method | java.lang.invoke.MethodHandles.Lookup::defineClass @since 9 | Frameworks may use java.lang.invoke.MethodHandles::privateLookupIn to obtain a Lookup object with the permission to access the private members a target class in a different module if the framework is granted with deep reflection access to the target class. |
| sun.io | java.nio.charsets @since 1.4 | |
| sun.misc.BASE64Decoder, sun.misc.BASE64Encoder, com.sun.org.apache.xml.internal.security.utils.Base64 |
java.util.Base64 @since 8 | See http://openjdk.java.net/jeps/135 |