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

BasicLookAndFeel should not call getComponentPopupMenu twice to get a popup menu

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 21
    • 17
    • client-libs
    • None

      BasicLookAndFeel calls getComponentPopupMenu once (line 2221) to determine if a menu is needed. If the result is not null, then BasicLookAndFeel calls getComponentPopMenu again (line 2228) to obtain the menu to be shown. It should instead save the result of the first invocation.

      As menus are sometimes constructed on demand, making a second call is less efficient. There is also the (unlikely) possibility that the second invocation will return null.

            psadhukhan Prasanta Sadhukhan
            alans Alan Snyder
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: