[jdk8u-dev] RFR: 8270317: Large Allocation in CipherSuite
Volker Simonis
simonis at openjdk.org
Tue Jan 31 12:11:11 UTC 2023
On Mon, 30 Jan 2023 20:20:16 GMT, Paul Hohensee <phh at openjdk.org> wrote:
> Backport for Oracle parity. Backport from 11u is not clean due to lack of CopyOf in 8u. The nearest equivalents are Collections.unmodifiableMap and Collections.unmodifiableList. Also, there is no jmh archive in 8u, so the performance test is not included.
>
> Tier1 and all security tests pass, in production at Amazon for over a year without issues.
Looks good except for the comment change (which might be a merge artifact?).
jdk/src/share/classes/sun/security/ssl/CipherSuite.java line 38:
> 36:
> 37: /**
> 38: * Enum for SSL/(D)TLS cipher suites
It doesn't look like the original 11u patch changed this comment so I don't think we need this change in 8.
jdk/src/share/classes/sun/security/ssl/CipherSuite.java line 904:
> 902: allowedCipherSuites = Collections.unmodifiableList(allowedCS);
> 903: defaultCipherSuites = Collections.unmodifiableList(defaultCS);
> 904: }
Agree that in this case `Collections.unmodifiableMap()`/`Collections.unmodifiableList()` are a good replacement for the missing `copyOf()`. And it should also be faster, because it avoids a copy :)
-------------
Marked as reviewed by simonis (Reviewer).
PR: https://git.openjdk.org/jdk8u-dev/pull/253
More information about the jdk8u-dev
mailing list