i read here spring , many other popular libraries break if oracle removes sun.misc.unsafe in java 9. however, there no static references class in spring or hibernate. so, claim true?
btw there 64 references unsafe in java 8, if oracle removes class update of them , no library affected (unless use unsafe directly is).
mark reinhold had talk during jvm language summit 2015 titled the secret history , tragic fate of sun.misc.unsafe. although these talks have plenty of disclaimers on them, can see proposed approach @ 10:23, described in jep260.
the general idea is:
- replace existing functionality safer, supported apis
- deprecate existing
unsafeapis has been replaced - remove deprecated code in next version
here relevant text jep260 (taken october 20th 2015):
in jdk 9 propose to:
encapsulate non-critical internal apis default: modules define them not export packages outside use. (access such apis available, last resort, via command-line flag @ both compile time , run time, unless apis revised or removed other reasons.)
encapsulate critical internal apis supported replacements exist in jdk 8, in same manner , same last-resort workaround. (a supported replacement 1 either part of java se 8 standard (i.e., in java.* or javax.* package) or else jdk-specific , annotated @jdk.exported (typically in com.sun.* or jdk.* package).)
not encapsulate critical internal apis supported replacements not exist in jdk 8 and, further, deprecate have supported replacements in jdk 9 intent encapsulate them, or possibly remove them, in jdk 10.
...
critical internal apis replacements introduced in jdk 9 deprecated in jdk 9 , either encapsulated or removed in jdk 10.
Comments
Post a Comment