Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8305191

Revert API signature changes made in JDK-8285504 and JDK-8285263

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 21
    • security-libs
    • None
    • source
    • minimal
    • Hide
      Subclasses will no longer be permitted to override the `CertStore::getDefaultType()`, `KeyManagerFactory::getDefaultAlgorithm()`, and `TrustManagerFactory::getDefaultAlgorithm()` methods, but that is unlikely to cause much compatibility risk because child classes were only allowed to override these methods during JDKs 19 and 20. The behavior of code calling these methods is unchanged.
      Show
      Subclasses will no longer be permitted to override the `CertStore::getDefaultType()`, `KeyManagerFactory::getDefaultAlgorithm()`, and `TrustManagerFactory::getDefaultAlgorithm()` methods, but that is unlikely to cause much compatibility risk because child classes were only allowed to override these methods during JDKs 19 and 20. The behavior of code calling these methods is unchanged.
    • Java API
    • SE

      Summary

      Add the final keyword to the static java.security.cert.CertStore::getDefaultType(), javax.net.ssl.KeyManagerFactory::getDefaultAlgorithm(), and javax.net.ssl.TrustManagerFactory::getDefaultAlgorithm() methods.

      Problem

      As part of JDK-8285263 and JDK-8285504, three changes were made that changed the signatures of public APIs: The final keyword was inadvertently removed from the static java.security.cert.CertStore::getDefaultType(), javax.net.ssl.KeyManagerFactory::getDefaultAlgorithm(), and javax.net.ssl.TrustManagerFactory::getDefaultAlgorithm() methods. This change had an extremely low compatibility risk so we decided to wait and revert the change in the next JDK release. That time has come.

      Solution

      Add the final keyword to static java.security.cert.CertStore::getDefaultType(), javax.net.ssl.KeyManagerFactory::getDefaultAlgorithm() and javax.net.ssl.TrustManagerFactory::getDefaultAlgorithm() methods.

      Specification

      Changes for java.security.cert.CertStore:

      -     public static String getDefaultType() {
      +     public static final String getDefaultType() {

      Changes for javax.net.ssl.KeyManagerFactory:

      -     public static String getDefaultAlgorithm() {
      +     public static final String getDefaultAlgorithm() {

      Changes for javax.net.ssl.TrustManagerFactory:

      -     public static String getDefaultAlgorithm() {
      +     public static final String getDefaultAlgorithm() {

            mpowers Mark Powers
            mullan Sean Mullan
            Sean Mullan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: