On Mon, 14 Jun 2021 11:34:50 GMT, Andrey Turbanov 
<github.com+741251+turban...@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/security/pkcs/PKCS7.java line 592:

> 590: 
> 591:             SignerInfo[] result = new SignerInfo[intResult.size()];
> 592:             return intResult.toArray(result);

could be simplified to
`return intResult.toArray(new SignerInfo[0]);`
which would eliminate array zeroing as bonus as I have learned from your other 
PR ;)

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

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

Reply via email to