Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 96136 invoked from network); 30 Sep 2010 06:57:02 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 30 Sep 2010 06:57:02 -0000 Received: (qmail 8664 invoked by uid 500); 30 Sep 2010 06:57:02 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 8295 invoked by uid 500); 30 Sep 2010 06:56:59 -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 8284 invoked by uid 99); 30 Sep 2010 06:56:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Sep 2010 06:56:57 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Sep 2010 06:56:55 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o8U6uYqG020245 for ; Thu, 30 Sep 2010 06:56:34 GMT Message-ID: <7615736.473451285829794031.JavaMail.jira@thor> Date: Thu, 30 Sep 2010 02:56:34 -0400 (EDT) From: "Joerg Schaible (JIRA)" To: issues@commons.apache.org Subject: [jira] Commented: (IO-249) Enhance closeQuietly to indicate success In-Reply-To: <31987904.459261285748396247.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/IO-249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12916393#action_12916393 ] Joerg Schaible commented on IO-249: ----------------------------------- What about the closeLogged variant and adding commons-logging as optional dep? > Enhance closeQuietly to indicate success > ---------------------------------------- > > Key: IO-249 > URL: https://issues.apache.org/jira/browse/IO-249 > Project: Commons IO > Issue Type: Improvement > Components: Utilities > Affects Versions: 2.0 > Reporter: Paul Benedict > Assignee: Paul Benedict > Priority: Minor > Fix For: 2.x > > > A convention of some programmers is to emit a log warning when a resource fails to close. Granted, such a condition is an error, but there's no reasonable recourse to the failure. Using IOUtils.closeQuietly() is very useful but all information about the success/failure is hidden. Returning Throwable will give insight into the error for diagnostic purposes. This change will be compatible with today's usage since the method currently returns void. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.