JDK-8275826 : Release Note: java.security.KeyPair is now Destroyable
  • Type: Sub-task
  • Component: security-libs
  • Sub-Component: java.security
  • Priority: P4
  • Status: Resolved
  • Resolution: Withdrawn
  • Submitted: 2021-10-22
  • Updated: 2022-03-30
  • Resolved: 2022-03-30
Description
To make destroying the privateKey object easier with java.security.KeyPair, Destroyable methods can be called directly on the KeyPair.  The multi-step process of calling getPrivateKey() to call the Destroyable methods is still supported. 
Comments
After discussions we have decided to close this as will-no-fix. Keys in a multithreaded situations, could have catastrophic consequences f the key is being used elsewhere. IllegalStateException is also suppose to be thrown on a Destroyable object, that would be a new exception requirement for KeyPair.getPrivate() which would be a compatibility concern.
27-10-2021