File tree Expand file tree Collapse file tree 3 files changed +3
-6
lines changed
src/java.base/share/classes/sun/security/ssl Expand file tree Collapse file tree 3 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -85,8 +85,7 @@ static final class AlpnSpec implements SSLExtensionSpec {
85
85
final List <String > applicationProtocols ;
86
86
87
87
private AlpnSpec (String [] applicationProtocols ) {
88
- this .applicationProtocols = Collections .unmodifiableList (
89
- Arrays .asList (applicationProtocols ));
88
+ this .applicationProtocols = List .of (applicationProtocols );
90
89
}
91
90
92
91
private AlpnSpec (HandshakeContext hc ,
Original file line number Diff line number Diff line change @@ -198,8 +198,7 @@ final class SSLSessionImpl extends ExtendedSSLSession {
198
198
Collections .unmodifiableCollection (
199
199
new ArrayList <>(hc .localSupportedSignAlgs ));
200
200
this .serverNameIndication = hc .negotiatedServerName ;
201
- this .requestedServerNames = Collections .unmodifiableList (
202
- new ArrayList <>(hc .getRequestedServerNames ()));
201
+ this .requestedServerNames = List .copyOf (hc .getRequestedServerNames ());
203
202
if (hc .sslConfig .isClientMode ) {
204
203
this .useExtendedMasterSecret =
205
204
(hc .handshakeExtensions .get (
Original file line number Diff line number Diff line change @@ -89,8 +89,7 @@ static final class CHServerNamesSpec implements SSLExtensionSpec {
89
89
* (see JDK-6323374).
90
90
*/
91
91
private CHServerNamesSpec (List <SNIServerName > serverNames ) {
92
- this .serverNames = Collections .<SNIServerName >unmodifiableList (
93
- new ArrayList <>(serverNames ));
92
+ this .serverNames = List .copyOf (serverNames );
94
93
}
95
94
96
95
private CHServerNamesSpec (HandshakeContext hc ,
You can’t perform that action at this time.
0 commit comments