Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 35817 invoked from network); 22 Jun 2007 09:12:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Jun 2007 09:12:27 -0000 Received: (qmail 21035 invoked by uid 500); 22 Jun 2007 09:12:30 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 20865 invoked by uid 500); 22 Jun 2007 09:12:29 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 20854 invoked by uid 99); 22 Jun 2007 09:12:29 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jun 2007 02:12:29 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jun 2007 02:12:25 -0700 Received: by brutus.apache.org (Postfix, from userid 33) id AE59B7141EF; Fri, 22 Jun 2007 02:12:05 -0700 (PDT) From: bugzilla@apache.org To: dev@ant.apache.org Subject: DO NOT REPLY [Bug 42713] - CBZip2OutputStream#finish method like in java.util.zip.GZIPOutputStream In-Reply-To: X-Bugzilla-Reason: AssignedTo Message-Id: <20070622091205.AE59B7141EF@brutus.apache.org> Date: Fri, 22 Jun 2007 02:12:05 -0700 (PDT) X-Virus-Checked: Checked by ClamAV on apache.org DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG� RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND� INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=42713 ------- Additional Comments From Stefan.Liebig@compeople.de 2007-06-22 02:12 ------- Proposed patch: - finish added - close and finalize changed ------------------------------------------------------------------------------ /** * Finishes compressing to the underlying stream without closing it, * so that multiple compressors can write subsequently to the same * output stream. * * @throws IOException */ public void finish() throws IOException { OutputStream outShadow = this.out; if ( outShadow != null && this.data != null ) { try { if ( this.runLength > 0 ) { writeRun(); } this.currentChar = -1; endBlock(); endCompression(); // outShadow.close(); } finally { // this.out = null; this.data = null; } } } /** * Overriden to close the stream. */ protected void finalize() throws Throwable { if ( this.data != null ) { close(); super.finalize(); } } public void close() throws IOException { finish(); OutputStream outShadow = this.out; if ( outShadow != null ) { try { outShadow.close(); } finally { this.out = null; } } // OutputStream outShadow = this.out; // if ( outShadow != null ) { // try { // if ( this.runLength > 0 ) { // writeRun(); // } // this.currentChar = -1; // endBlock(); // endCompression(); // outShadow.close(); // } finally { // this.out = null; // this.data = null; // } // } } -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org