RFR: 8304947: Unnecessary Vector usage in java.awt.MenuBar.shortcuts

Sergey Bylokhov serb at openjdk.org
Tue Apr 4 22:53:09 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.

Marked as reviewed by serb (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/13149#pullrequestreview-1371891285



More information about the client-libs-dev mailing list