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

Charset may not be threadsafe, because the HashSet is not synch.

    Details

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

      Description

      Charset may not be threadsafe, because the HashSet "set" is not synch.

      The set is only updated by the protected add() method, which is currently only used by the protected ctors.

      Perhaps add() should be private?
      This would prevent any changes to the set after construction, and might be sufficient to ensure safe publication between threads.

      Alternatively, make the set synch, as is done for COMMON.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sebb@apache.org Sebb
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: