JDK-6810254 : Lazily instantiate the shared secret access objects
  • Type: Bug
  • Component: other-libs
  • Sub-Component: other
  • Affected Version: 7
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2009-02-25
  • Updated: 2010-04-02
  • Resolved: 2009-03-27
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
6u14Fixed 7 b53Fixed
Related Reports
Relates :  
Relates :  
sun.misc.Java*Access objects are created at initialization time.  They are only needed when certain API is used.  They can be initialized lazily when needed.

These shared secret access object provides a mechanism for calling implementation-private methods in another package while avoiding the primary disadvantage of using reflection for this purpose, namely the loss of compile-time checking.

SUGGESTED FIX See attached patch.

EVALUATION The fix is to register the shutdown hooks only when needed so that java.io.Console and other implementation classes for deleteOnExit hooks and application hooks are not loaded unless they are needed. JavaIODeleteOnExitAccess will be removed and the other shared secret access objects will remain to be set up during initialization.

EVALUATION Decouple class dependency for JDK7