ActionContext instance cached on first call of method per instance of ActionContextCompatManager

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Low
    • No-Version
    • Affects Version/s: No-Version
    • Component/s: Server - Platform
    • None
    • Severity 3 - Minor

      Issue Summary

      ActionContext instance is retrieved and then cached upon first method call of an ActionContextCompatManager instance. This is problematic as the ActionContext instance should be unique per thread and thus request. It is cached per instance of ActionContextCompatManager.

      Affected version: confluence-compat-lib 1.5.3

      Steps to Reproduce

      1. Construct an ActionContextCompatManager instance.
      2. Call instance method put("key", "someValue")
      3. Call instance method get("key") on a different thread/request

      Expected Results

      Returns null

      Actual Results

      Returns "someValue"

      Workaround

      Given the ActionContext is cached per instance of ActionContextCompatManager, constructing a new ActionContextCompatManager per request is a potential workaround.

            Assignee:
            Kusal Kithul-Godage
            Reporter:
            Kusal Kithul-Godage
            Votes:
            8 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: