Uploaded image for project: 'Shiro'
  1. Shiro
  2. SHIRO-498

ThreadLocal should not be created when not necessary

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.2
    • Fix Version/s: 1.2.4
    • Component/s: None
    • Labels:

      Description

      org.apache.shiro.util.ThreadContext.getValue(Object) and org.apache.shiro.util.ThreadContext.remove(Object) initialze the TheadLocal unnecessarily via initialValue(). Both methods should return without creating the ThreadLocal to avoid potential memory leaks.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jkemnade Jochen Kemnade
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: