Commons Lang
  1. Commons Lang
  2. LANG-586

Use of ThreadLocals in ToStringStyle and HashCodeBuilder trigger memory leaks in container environments

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5
    • Component/s: lang.builder.*
    • Labels:
      None

      Description

      The thread local in org.apache.commons.lang3.builder.ToStringStyle is created but never removed and no API is provided to remove it. If a webapp's use of LANG triggers the loading of this class, a reference chain will be created that will cause a memory leak on web application reload.

      See http://markmail.org/thread/uetw2fdrsqgbh2cv for more info.

        Activity

        Mark Thomas made changes -
        Workflow jira [ 12498055 ] Default workflow, editable Closed status [ 12602560 ]
        Henri Yandell made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Niall Pemberton made changes -
        Fix Version/s 3.0 [ 12311714 ]
        Matt Benson made changes -
        Summary Use of ThreadLocal in ToStringStyle.java triggers memory leak in container environment Use of ThreadLocals in ToStringStyle and HashCodeBuilder trigger memory leaks in container environments
        Matt Benson made changes -
        Fix Version/s 2.5 [ 12314743 ]
        Matt Benson made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 3.0 [ 12311714 ]
        Resolution Fixed [ 1 ]
        Mark Thomas created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Mark Thomas
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development