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

Clean the duplicated block in SSLContextImpl

XMLWordPrintable

      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}

            xuelei Xuelei Fan
            xuelei Xuelei Fan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: