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

JMenu.buildMenuElementArray() endless loop

XMLWordPrintable

    • b116
    • x86
    • windows_vista

      FULL PRODUCT VERSION :
      java version "1.6.0_20"
      Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
      Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.0.6002]

      A DESCRIPTION OF THE PROBLEM :
      When calling JMenu.doClick(int) on a JMenu that is part of a JPopupMenu, so having no JMenuBar at all the call to JMenu.buildMenuElementArray(JMenu leaf) hangs in an endless loop.


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Create JPopupMenu, add JMenu into this and JMenuItem into the JMenu.

      Now call doClick(10) on the JMenu.


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      No endless loop, maybe a click, maybe nothing, but no endless loop.


      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      Call MenuSelectionManager.defaultManager().setSelectedPath(me) in own code with an own created array like buildMenuElementArray() does but WITHOUT endless loop. Works!

            alexsch Alexandr Scherbatiy
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: