Add a null-safe static factory method to "jdk.test.lib.net.SimpleSSLContext"

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 27
    • Affects Version/s: 27
    • Component/s: core-libs
    • master

      `SimpleSSLContext::get` can return null, and hence, every call site is decorated with

          sslContext = new SimpleSSLContext().get();
          if (sslContext == null) {
              throw new AssertionError("Unexpected null sslContext");
          }

      Introduce a new static factory method that is guaranteed to return a non-null `SSLContext`, or throw an exception if it fails to do so.

      The migration of tests to the new method, and the removal of old methods will be implemented in follow-up ticket(s) to help with reviewing and backporting.

            Assignee:
            Volkan Yazici
            Reporter:
            Volkan Yazici
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: