RFR: 8304947: Unnecessary Vector usage in java.awt.MenuBar.shortcuts
Phil Race
prr at openjdk.org
Fri Apr 7 04:57:46 UTC 2023
On Wed, 22 Mar 2023 19:12:34 GMT, Andrey Turbanov <aturbanov at openjdk.org> wrote:
> Method `'java.awt.MenuBar#shortcuts` creates a 'Vector<MenuShortcut>', fills it and then returns its 'Enumeration elements()' as return value.
> Instead of usage of legacy synchronized Vector here we can use ArrayList instead. Wrap it in Collections.enumeration to adapt to 'Enumeration' result type.
Sorry, but this proposed change which comes with no test seems completely not worth it for
whatever benefit there might be (none that I can see). Please withdraw it.
Also go to https://openjdk.org/groups/client-libs/ and read the section
"Guidelines on what kinds of changes we would like to see - or not see"
-------------
Changes requested by prr (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/13149#pullrequestreview-1375821717
More information about the client-libs-dev
mailing list