[
https://issues.apache.org/jira/browse/SHIRO-498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jochen Kemnade updated SHIRO-498:
---------------------------------
Attachment: 0001-don-t-create-ThreadLocals-when-not-needed.patch
The patch removes the initial value from the ThreadLocal and initializes it
only when needed.
> ThreadLocal should not be created when not necessary
> ----------------------------------------------------
>
> Key: SHIRO-498
> URL: https://issues.apache.org/jira/browse/SHIRO-498
> Project: Shiro
> Issue Type: Improvement
> Affects Versions: 1.2.2
> Reporter: Jochen Kemnade
> Attachments: 0001-don-t-create-ThreadLocals-when-not-needed.patch
>
>
> 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.
--
This message was sent by Atlassian JIRA
(v6.2#6252)