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

    • 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.

          Form Name

            [CONFSERVER-81828] ActionContext instance cached on first call of method per instance of ActionContextCompatManager

            We have released version 1.5.4 of confluence-compat-lib which contains the fix.

            Kusal Kithul-Godage added a comment - We have released version 1.5.4 of confluence-compat-lib which contains the fix.

              854eef6f5746 Kusal Kithul-Godage
              854eef6f5746 Kusal Kithul-Godage
              Affected customers:
              8 This affects my team
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: