Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-81828

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • No-Version
    • No-Version
    • Server - Platform
    • None

      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.

              854eef6f5746 Kusal Kithul-Godage
              854eef6f5746 Kusal Kithul-Godage
              Votes:
              8 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: