<AWT Dev> RFR: 8271603: Unnecessary Vector usage in java.desktop [v6]
Andrey Turbanov
github.com+741251+turbanoff at openjdk.java.net
Fri Sep 3 08:05:00 UTC 2021
On Fri, 3 Sep 2021 03:17:02 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
>> Andrey Turbanov has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains eight commits:
>>
>> - Merge remote-tracking branch 'origin/master' into avoid-unnecessary-vector-usage-in-java.desktop
>>
>> # Conflicts:
>> # src/java.desktop/share/classes/sun/awt/shell/ShellFolder.java
>> - 8271603: Unnecessary Vector usage in java.desktop
>> use toArray with zero sized array in places where Vector.copyInto was used
>> - 8271603: Unnecessary Vector usage in java.desktop
>> migrate even more usages
>> - 8271603: Unnecessary Vector usage in java.desktop
>> migrate more usages. Not sure how I missed them
>> - 8271603: Unnecessary Vector usage in java.desktop
>> revert back to use cycle to copy into array
>> - 8271603: Unnecessary Vector usage in java.desktop
>> revert back to Enumeration
>> bring back default values
>> - [PATCH] Unnecessary Vector usage in java.desktop
>> use zero-length array
>> - [PATCH] Unnecessary Vector usage in java.desktop
>
> src/java.desktop/share/classes/javax/swing/text/html/CSS.java line 1578:
>
>> 1576: }
>> 1577: String[] retValue = new String[temp.size()];
>> 1578: temp.toArray(retValue);
>
> Why not `return temp.toArray(new String[0]);` like in other places in the last commit?
Good catch! Update here too.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4680
More information about the awt-dev
mailing list