Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1B3C017A22 for ; Sun, 15 Feb 2015 23:12:12 +0000 (UTC) Received: (qmail 15358 invoked by uid 500); 15 Feb 2015 23:12:11 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 15261 invoked by uid 500); 15 Feb 2015 23:12:11 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 15249 invoked by uid 99); 15 Feb 2015 23:12:11 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 15 Feb 2015 23:12:11 +0000 Date: Sun, 15 Feb 2015 23:12:11 +0000 (UTC) From: "Sebb (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (COMPRESS-302) Retore immutability/thread-safety to ArchiveStreamFactory MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/COMPRESS-302?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sebb resolved COMPRESS-302. --------------------------- Resolution: Fixed Fix Version/s: 1.10 Used a different method to minimise code changes - the original field is now set in the constructor. URL: http://svn.apache.org/r1660005 Log: COMPRESS-302 Restore immutability/thread-safety to ArchiveStreamFactory. Modified: commons/proper/compress/trunk/src/changes/changes.xml commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveStreamFactory.java > Retore immutability/thread-safety to ArchiveStreamFactory > --------------------------------------------------------- > > Key: COMPRESS-302 > URL: https://issues.apache.org/jira/browse/COMPRESS-302 > Project: Commons Compress > Issue Type: Bug > Affects Versions: 1.9 > Reporter: Sebb > Fix For: 1.10 > > 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 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. -- This message was sent by Atlassian JIRA (v6.3.4#6332)