commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Bodewig (JIRA)" <>
Subject [jira] [Commented] (COMPRESS-302) Retore immutability to ArchiveStremFactory
Date Sun, 15 Feb 2015 18:45:11 GMT


Stefan Bodewig commented on COMPRESS-302:


you may want to cache getEntryEncoding in a local variable, but that's picking nits.  And
maybe add a hint about the new exception to setEntryEncoding's javadoc.

> Retore immutability to ArchiveStremFactory
> ------------------------------------------
>                 Key: COMPRESS-302
>                 URL:
>             Project: Commons Compress
>          Issue Type: Bug
>            Reporter: Sebb
>         Attachments: COMPRESS-302.patch
> 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
> 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.

This message was sent by Atlassian JIRA

View raw message