Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 36645 invoked from network); 2 Oct 2010 00:50:55 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Oct 2010 00:50:55 -0000 Received: (qmail 94083 invoked by uid 500); 2 Oct 2010 00:50:54 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 93986 invoked by uid 500); 2 Oct 2010 00:50:54 -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 93978 invoked by uid 99); 2 Oct 2010 00:50:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Oct 2010 00:50:54 +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; Sat, 02 Oct 2010 00:50:53 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o920oWaf001916 for ; Sat, 2 Oct 2010 00:50:33 GMT Message-ID: <12697838.507991285980632660.JavaMail.jira@thor> Date: Fri, 1 Oct 2010 20:50:32 -0400 (EDT) From: "Paul Benedict (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 [ https://issues.apache.org/jira/browse/IO-249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12917132#action_12917132 ] Paul Benedict commented on IO-249: ---------------------------------- I definitely believe both of you are on the right track. The callback/handler strategy is a MUCH better alternative than my original suggestion. However, I would like to avoid instantiating a handler per resource. Is there an alternative? Otherwise, a callback will work since I can make it a singleton. > 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 > > Attachments: CloseableHandler.java > > > 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.