Uploaded image for project: 'Click'
  1. Click
  2. CLK-713

Race condition in Menu.getHeadElements

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • None
    • 2.3.0-M1
    • extras
    • None

    Description

      Multi threads can access a cached Menu while it is being initialized. The Exception can be:

      java.lang.ArrayIndexOutOfBoundsException: 2
      at java.util.ArrayList.add(ArrayList.java:352)
      at org.apache.click.extras.control.Menu.getHeadElements(Menu.java:1077)
      at org.apache.click.util.PageImports.processControl(PageImports.java:37

      Initializing the menu in MenuFactory by calling menu.getHeadElements() seems to make the race condition go away.

      Attachments

        Activity

          People

            sabob Bob Schellink
            bckfnn Finn Bock
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: