Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B5A5B200CED for ; Fri, 18 Aug 2017 20:54:07 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B41B716D47B; Fri, 18 Aug 2017 18:54:07 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 0FCE316D476 for ; Fri, 18 Aug 2017 20:54:06 +0200 (CEST) Received: (qmail 83743 invoked by uid 500); 18 Aug 2017 18:54:05 -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 83730 invoked by uid 99); 18 Aug 2017 18:54:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Aug 2017 18:54:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id A71A5C187F for ; Fri, 18 Aug 2017 18:54:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id etSJ6qyL1u2N for ; Fri, 18 Aug 2017 18:54:04 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 504F860E3A for ; Fri, 18 Aug 2017 18:54:03 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 317F7E0E3F for ; Fri, 18 Aug 2017 18:54:02 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id C490E2538B for ; Fri, 18 Aug 2017 18:54:00 +0000 (UTC) Date: Fri, 18 Aug 2017 18:54:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (IO-546) ClosedOutputStream#flush should throw MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 18 Aug 2017 18:54:07 -0000 [ https://issues.apache.org/jira/browse/IO-546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16133461#comment-16133461 ] ASF GitHub Bot commented on IO-546: ----------------------------------- GitHub user tjcelaya opened a pull request: https://github.com/apache/commons-io/pull/42 [IO-546] ClosedOutputStream#flush should throw While debugging an issue involving usage of `CloseShieldOutputStream` I discovered that `ClosedOutputStream#flush` is not overridden and will silently succeed. Not sure how much of a breaking change this might be but I think it makes more sense for `ClosedOutputStream#flush` to throw. This is only really meaningful in contexts where multiple streams are being chained together and some of the streams before `CloseShieldOutputStream` perform buffering, but it would make behavior more consistent for these more complex use-cases. See [IO-546](https://issues.apache.org/jira/browse/IO-546) where @dekobon has attached an example program. You can merge this pull request into a Git repository by running: $ git pull https://github.com/tjcelaya/commons-io fix/IO-546-ClosedOutputStream-flush Alternatively you can review and apply these changes as the patch at: https://github.com/apache/commons-io/pull/42.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #42 ---- commit 854ed1d0d4495fa400dc4128d0e7374accb3f9c1 Author: Tomas Celaya Date: 2017-08-18T18:47:20Z ClosedOutputStream#flush should throw ---- > ClosedOutputStream#flush should throw > ------------------------------------- > > Key: IO-546 > URL: https://issues.apache.org/jira/browse/IO-546 > Project: Commons IO > Issue Type: Improvement > Components: Streams/Writers > Reporter: Tomas Celaya > Priority: Minor > Attachments: IO-546.patch > > > While debugging an issue involving usage of {{CloseShieldOutputStream}} I discovered that {{ClosedOutputStream#flush}} is not overridden and will silently succeed. Not sure how much of a breaking change this might be but I think it makes more sense for {{ClosedOutputStream#flush}} to throw. This is only really meaningful in contexts where multiple streams are being chained together and some of the streams before {{CloseShieldOutputStream}} perform buffering, but it would make behavior more consistent for these more complex use-cases. -- This message was sent by Atlassian JIRA (v6.4.14#64029)