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

Clean the duplicated block in SSLContextImpl

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 14
    • Fix Version/s: 14
    • Component/s: security-libs
    • Labels:

      Description

      The following arrays (candidates) are duplicated, it would be nice to use just one array.
      {code}
       841 // Use the default enabled protocols if no customization
       842 ProtocolVersion[] candidates;
       843 if (refactored.isEmpty()) {
       844 if (client) {
       845 // default client protocols
       846 candidates = new ProtocolVersion[] {
       847 ProtocolVersion.TLS13,
       848 ProtocolVersion.TLS12,
       849 ProtocolVersion.TLS11,
       850 ProtocolVersion.TLS10
       851 };
       852
       853 } else {
       854 // default server protocols
       855 candidates = new ProtocolVersion[] {
       856 ProtocolVersion.TLS13,
       857 ProtocolVersion.TLS12,
       858 ProtocolVersion.TLS11,
       859 ProtocolVersion.TLS10
       860 };
       861 }
      {code}

        Attachments

          Activity

            People

            • Assignee:
              xuelei Xue-Lei Fan
              Reporter:
              xuelei Xue-Lei Fan
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: