Uploaded image for project: 'Commons Compress'
  1. Commons Compress
  2. COMPRESS-302

Retore immutability/thread-safety to ArchiveStreamFactory

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.10
    • Component/s: None
    • Labels:
      None

      Description

      COMPRESS-180 added support for encoding.
      Unfortunately this was done in a way that broke immutability.
      Also the factory is no longer thread-safe as the encoding field is not synch/volatile.

      Consider whether to restore immutability, e.g. by adding a constuctor which takes the encoding setting. The setEntryEncoding method could be deprecated intitially and eventually dropped.

      One way to support immutability now would be to add a second final encoding field which is set by a new ctor. See patch to follow.

        Attachments

        1. COMPRESS-302.patch
          6 kB
          Sebb

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sebb Sebb
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: