Uploaded image for project: 'Jetspeed 2 (Retired)'
  1. Jetspeed 2 (Retired)
  2. JS2-619

Non-thread safe code in PortalSiteRequestContextImpl.java

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.1-dev
    • None
    • Components Core
    • None
    • Any environment.

    Description

      Every header.vm calls $site.getMenu(...) to retreive menus for a folder.
      And the class, named 'org.apache.jetspeed.portalsite.impl.PortalSiteRequestContextImpl', manages a set and a map to store and query portlet definition names and menus.

      However, because those are instantiated as a HashSet and as a HashMap, JS2 can throw ConcurrentModificationException when portlet definitions and menus are to be cached.

      This exception can be observed in the following case:

      • For some reason, user can request twice for the same folder.
      • For some reason, a developer can design the pages to call header.vm simultaneously.
        (Actually these situations are not usual and it may not occur after first visit for a folder, but it can occur.)

      Therefore, those are to be synchronized.

      Attachments

        1. getmenu-diff.txt
          2 kB
          Woonsan Ko
        2. getmenu-diff2.txt
          5 kB
          Woonsan Ko

        Activity

          People

            taylor David Sean Taylor
            woon_san Woonsan Ko
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: