Integrated: 8269130: Replace usages of Collection.toArray() with Collection.toArray(T[]) to avoid redundant array copying

Andrey Turbanov github.com+741251+turbanoff at openjdk.java.net
Tue Aug 10 13:31:33 UTC 2021


On Mon, 14 Jun 2021 17:00:29 GMT, Andrey Turbanov <github.com+741251+turbanoff at openjdk.org> wrote:

> I found few places, where code initially perform `Object[] Colleciton.toArray()` call and then manually copy array into another array with required type.
> This PR cleanups such places to more shorter call `T[] Collection.toArray(T[])`.

This pull request has now been integrated.

Changeset: 35b399ac
Author:    Andrey Turbanov <turbanoff at gmail.com>
Committer: Jayathirth D V <jdv at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/35b399aca810db63371ff65046f047ef0b955161
Stats:     70 lines in 8 files changed: 0 ins; 54 del; 16 mod

8269130: Replace usages of Collection.toArray() with Collection.toArray(T[]) to avoid redundant array copying

Reviewed-by: mullan, serb

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

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



More information about the security-dev mailing list