Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-369

ExceptionUtils not thread-safe

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.0, 2.7
    • lang.exception.*
    • None

    Description

      The ExceptionUtils class does not appear to be thread-safe:

      • CAUSE_METHOD_NAMES is not final, so may not be visible to all threads
      • addCauseMethodName() and removeCauseMethodName() can update CAUSE_METHOD_NAMES but are not synch.
      • all accesses to CAUSE_METHOD_NAMES probably need to be synchronised

      The documentation does not state whether or not the class is thread-safe, but given that it only has static methods it does not make any sense unless it is thread-safe.

      Attachments

        1. LANG-369.patch
          4 kB
          Henri Yandell
        2. LANG-369-2.patch
          3 kB
          Sebb

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sebb Sebb
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: