[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    Re: [OpenJDK 2D-Dev] RFR: 8269130: Replace usages of Collection.toArray() with Collection.toArray(T[
From:       Brett Okken <github.com+2996845+bokken () openjdk ! java ! net>
Date:       2021-07-26 19:58:30
Message-ID: FRn0jQHYWMJL5GTfhu4TWGlg8OaBHVpEoIQ_pCka3rs=.151177ce-ac88-4932-b8c9-c6e59a148b5c () github ! com
[Download RAW message or body]

On Mon, 14 Jun 2021 17:00:29 GMT, Andrey Turbanov \
<github.com+741251+turbanoff@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[])`.

src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/SystemDictionaryHelper.java \
line 92:

> 90:       }
> 91: 
> 92:       InstanceKlass[] searchResult = tmp.toArray(new InstanceKlass[0]);

Is it too far outside the scope of these changes to make `tmp` an `ArrayList` rather \
than a `Vector`?

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

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic