mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8258514: Replace Collections.unmodifiableList with List.of
Reviewed-by: jnimeh
This commit is contained in:
parent
59f4c4aad5
commit
efd61c6f53
3 changed files with 3 additions and 6 deletions
|
@ -85,8 +85,7 @@ final class AlpnExtension {
|
||||||
final List<String> applicationProtocols;
|
final List<String> applicationProtocols;
|
||||||
|
|
||||||
private AlpnSpec(String[] applicationProtocols) {
|
private AlpnSpec(String[] applicationProtocols) {
|
||||||
this.applicationProtocols = Collections.unmodifiableList(
|
this.applicationProtocols = List.of(applicationProtocols);
|
||||||
Arrays.asList(applicationProtocols));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private AlpnSpec(HandshakeContext hc,
|
private AlpnSpec(HandshakeContext hc,
|
||||||
|
|
|
@ -198,8 +198,7 @@ final class SSLSessionImpl extends ExtendedSSLSession {
|
||||||
Collections.unmodifiableCollection(
|
Collections.unmodifiableCollection(
|
||||||
new ArrayList<>(hc.localSupportedSignAlgs));
|
new ArrayList<>(hc.localSupportedSignAlgs));
|
||||||
this.serverNameIndication = hc.negotiatedServerName;
|
this.serverNameIndication = hc.negotiatedServerName;
|
||||||
this.requestedServerNames = Collections.unmodifiableList(
|
this.requestedServerNames = List.copyOf(hc.getRequestedServerNames());
|
||||||
new ArrayList<>(hc.getRequestedServerNames()));
|
|
||||||
if (hc.sslConfig.isClientMode) {
|
if (hc.sslConfig.isClientMode) {
|
||||||
this.useExtendedMasterSecret =
|
this.useExtendedMasterSecret =
|
||||||
(hc.handshakeExtensions.get(
|
(hc.handshakeExtensions.get(
|
||||||
|
|
|
@ -89,8 +89,7 @@ final class ServerNameExtension {
|
||||||
* (see JDK-6323374).
|
* (see JDK-6323374).
|
||||||
*/
|
*/
|
||||||
private CHServerNamesSpec(List<SNIServerName> serverNames) {
|
private CHServerNamesSpec(List<SNIServerName> serverNames) {
|
||||||
this.serverNames = Collections.<SNIServerName>unmodifiableList(
|
this.serverNames = List.copyOf(serverNames);
|
||||||
new ArrayList<>(serverNames));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private CHServerNamesSpec(HandshakeContext hc,
|
private CHServerNamesSpec(HandshakeContext hc,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue