On Wed, 16 Jun 2021 09:01:30 GMT, Сергей Цыпанов <github.com+10835776+stsypa...@openjdk.org> wrote:
>> Usage of thread-safe collection `Vector` is unnecessary. It's recommended to >> use `ArrayList` if a thread-safe implementation is not needed. >> I checked only places where `Vector` was used as local variable. > > src/java.base/share/classes/sun/net/www/protocol/https/HttpsClient.java line > 154: > >> 152: while (tokenizer.hasMoreTokens()) >> 153: v.add(tokenizer.nextToken()); >> 154: ciphers = new String [v.size()]; > > Looks like this whole `else` block can be simplified to `ciphers = > cipherString.split(",");` It's not a drop-in replacement. Result is different for some Strings. For example for `, A` I would prefer to preserve existing behavior under this cleanup. ------------- PR: https://git.openjdk.java.net/jdk/pull/4482