<AWT Dev> RFR: 8271603: Unnecessary Vector usage in java.desktop [v2]
Andrey Turbanov
github.com+741251+turbanoff at openjdk.java.net
Tue Aug 24 21:14:06 UTC 2021
On Mon, 2 Aug 2021 05:19:32 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
>> Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8271603: Unnecessary Vector usage in java.desktop
>> revert back to Enumeration
>> bring back default values
>
> src/java.desktop/share/classes/java/awt/MenuBar.java line 348:
>
>> 346: Iterator<MenuShortcut> e = getMenu(i).shortcuts();
>> 347: while (e.hasNext()) {
>> 348: shortcuts.addElement(e.next());
>
> I think it is fine to replace the Enumeration with the Iterator in most of the places, but here we will get a kind of mix of both, since we cannot remove the usage of Enumeration in the return time.
reverted back to Vector here
> src/java.desktop/share/classes/javax/print/MimeType.java line 576:
>
>> 574: ArrayList<String> thePieces = new ArrayList<>();
>> 575: boolean mediaTypeIsText;
>> 576: boolean parameterNameIsCharset;
>
> Default values might be removed as a separate cleanup.
reverted
-------------
PR: https://git.openjdk.java.net/jdk/pull/4680
More information about the awt-dev
mailing list