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

Improve with List.copyOf

XMLWordPrintable

      The implementation code in SSLParameters could be improved with List.copyOf() method.

      - return Collections.<SNIServerName>unmodifiableList(new ArrayList<>(sniNames.values()));
      + return List.copyOf(sniNames.values());

      - return Collections.<SNIMatcher>unmodifiableList(new ArrayList<>(sniMatchers.values()));
      + return List.copyOf(sniMatchers.values());

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

              Created:
              Updated:
              Resolved: