commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (IO-388) CloseAllQuietly Method
Date Fri, 26 Jul 2013 16:55:51 GMT

    [ https://issues.apache.org/jira/browse/IO-388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13720954#comment-13720954
] 

Sebb edited comment on IO-388 at 7/26/13 4:55 PM:
--------------------------------------------------

Or perhaps overload the existing method:

{code}
public static void closeQuietly(final Closeable ... closeables) {
    if (closeables == null) { // avoid NPE if array is null
        return;
    }
    for(Closeable closeable : closeables) {
        closeQuietly(closeable);
    }
}
{code}
                
      was (Author: sebb@apache.org):
    Or perhaps override the existing method:

{code}
public static void closeQuietly(final Closeable ... closeables) {
    if (closeables == null) { // avoid NPE if array is null
        return;
    }
    for(Closeable closeable : closeables) {
        closeQuietly(closeable);
    }
}
{code}
                  
> CloseAllQuietly Method
> ----------------------
>
>                 Key: IO-388
>                 URL: https://issues.apache.org/jira/browse/IO-388
>             Project: Commons IO
>          Issue Type: Wish
>            Reporter: BELUGA BEHR
>            Priority: Minor
>
> public static void closeAllQuietly(Closeable... closables) {
>     for (Closeable closable : closables)
>     {
>         closeQuietly(closable);
>     }
> }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message