Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8304947

Unnecessary Vector usage in java.awt.MenuBar.shortcuts

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Unresolved
    • P5
    • tbd
    • 20
    • client-libs

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              aturbanov Andrey Turbanov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: