RFR: 8258852: Arrays.asList() for single item could be replaced with List.of() [v2]

Xue-Lei Andrew Fan xuelei at openjdk.java.net
Tue Jan 5 18:34:58 UTC 2021


On Tue, 5 Jan 2021 18:01:12 GMT, Sean Mullan <mullan at openjdk.org> wrote:

>> Xue-Lei Andrew Fan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Replace Collections.singletonList() with List.of()
>
> src/java.base/share/classes/sun/security/ssl/SSLConfiguration.java line 142:
> 
>> 140:         this.identificationProtocol = null;
>> 141:         this.serverNames = Collections.emptyList();
>> 142:         this.sniMatchers = Collections.emptyList();
> 
> Here you use Collections.emptyList() instead of List.of(). Probably ok, but maybe you want to change that to List.of().

There are some other places that use Collections.emptyList(), I will make the update all together in another bug.

-------------

PR: https://git.openjdk.java.net/jdk/pull/1872



More information about the security-dev mailing list