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

On Mac a menu with dynamic menu items may trigger infinite loop

XMLWordPrintable

      Consider running attached code and take NativeMenuBar > Debug > Submenu: you enter an infinite loop.
      The line of code where I do "menu.getItems().add(new MenuItem("A new menu item !"));" is wrapped into an if with a max value of 10.
      If you change this value to 1 or 2 then you won't enter infinite loop; as soon as it is 3 or above you can never open one single time the submenu, you enter directly the infinite loop.

      I suspect a side effect of the RT-19957.

            leifs Leif Samuelsson (Inactive)
            yjoan Yves Joan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: