8258514: Replace Collections.unmodifiableList with List.of
Reviewed-by: jnimeh
This commit is contained in:
parent
59f4c4aad5
commit
efd61c6f53
@ -85,8 +85,7 @@ final class AlpnExtension {
|
||||
final List<String> applicationProtocols;
|
||||
|
||||
private AlpnSpec(String[] applicationProtocols) {
|
||||
this.applicationProtocols = Collections.unmodifiableList(
|
||||
Arrays.asList(applicationProtocols));
|
||||
this.applicationProtocols = List.of(applicationProtocols);
|
||||
}
|
||||
|
||||
private AlpnSpec(HandshakeContext hc,
|
||||
|
@ -198,8 +198,7 @@ final class SSLSessionImpl extends ExtendedSSLSession {
|
||||
Collections.unmodifiableCollection(
|
||||
new ArrayList<>(hc.localSupportedSignAlgs));
|
||||
this.serverNameIndication = hc.negotiatedServerName;
|
||||
this.requestedServerNames = Collections.unmodifiableList(
|
||||
new ArrayList<>(hc.getRequestedServerNames()));
|
||||
this.requestedServerNames = List.copyOf(hc.getRequestedServerNames());
|
||||
if (hc.sslConfig.isClientMode) {
|
||||
this.useExtendedMasterSecret =
|
||||
(hc.handshakeExtensions.get(
|
||||
|
@ -89,8 +89,7 @@ final class ServerNameExtension {
|
||||
* (see JDK-6323374).
|
||||
*/
|
||||
private CHServerNamesSpec(List<SNIServerName> serverNames) {
|
||||
this.serverNames = Collections.<SNIServerName>unmodifiableList(
|
||||
new ArrayList<>(serverNames));
|
||||
this.serverNames = List.copyOf(serverNames);
|
||||
}
|
||||
|
||||
private CHServerNamesSpec(HandshakeContext hc,
|
||||
|
Loading…
x
Reference in New Issue
Block a user