[jira] Created: (IO-224) IOUtils.closeQuietly() should take a Closeable as a parameter.

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (IO-224) IOUtils.closeQuietly() should take a Closeable as a parameter.

ASF GitHub Bot (Jira)
IOUtils.closeQuietly() should take a Closeable as a parameter.
--------------------------------------------------------------

                 Key: IO-224
                 URL: https://issues.apache.org/jira/browse/IO-224
             Project: Commons IO
          Issue Type: Improvement
          Components: Utilities
    Affects Versions: 1.4
            Reporter: Sean Cote
            Priority: Minor


Right now, there are several IOUtils.closeQuietly methods that take things like InputStream, OutputStream, Reader, Writer, but why not simply have one IOUtils.closeQuietly method which takes a Closeable? It seems like this would simplify things and also enhance the usability of the function.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (IO-224) IOUtils.closeQuietly() should take a Closeable as a parameter.

ASF GitHub Bot (Jira)

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

Paul Benedict commented on IO-224:
----------------------------------

Great idea, Sean. The other methods could then be deprecated in 1.5. (The others shouldn't be removed until a 2.0 release because it would break binary compatibility.)

> IOUtils.closeQuietly() should take a Closeable as a parameter.
> --------------------------------------------------------------
>
>                 Key: IO-224
>                 URL: https://issues.apache.org/jira/browse/IO-224
>             Project: Commons IO
>          Issue Type: Improvement
>          Components: Utilities
>    Affects Versions: 1.4
>            Reporter: Sean Cote
>            Priority: Minor
>
> Right now, there are several IOUtils.closeQuietly methods that take things like InputStream, OutputStream, Reader, Writer, but why not simply have one IOUtils.closeQuietly method which takes a Closeable? It seems like this would simplify things and also enhance the usability of the function.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Resolved: (IO-224) IOUtils.closeQuietly() should take a Closeable as a parameter.

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

     [ https://issues.apache.org/jira/browse/IO-224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Niall Pemberton resolved IO-224.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0
         Assignee: Niall Pemberton

Added, thanks for the suggestion:

http://svn.apache.org/viewvc?view=revision&revision=897582

> IOUtils.closeQuietly() should take a Closeable as a parameter.
> --------------------------------------------------------------
>
>                 Key: IO-224
>                 URL: https://issues.apache.org/jira/browse/IO-224
>             Project: Commons IO
>          Issue Type: Improvement
>          Components: Utilities
>    Affects Versions: 1.4
>            Reporter: Sean Cote
>            Assignee: Niall Pemberton
>            Priority: Minor
>             Fix For: 2.0
>
>
> Right now, there are several IOUtils.closeQuietly methods that take things like InputStream, OutputStream, Reader, Writer, but why not simply have one IOUtils.closeQuietly method which takes a Closeable? It seems like this would simplify things and also enhance the usability of the function.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (IO-224) IOUtils.closeQuietly() should take a Closeable as a parameter.

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

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

Paul Benedict commented on IO-224:
----------------------------------

Unfortunately Socket does not implement Closeable. It would be a good candidate to add.

> IOUtils.closeQuietly() should take a Closeable as a parameter.
> --------------------------------------------------------------
>
>                 Key: IO-224
>                 URL: https://issues.apache.org/jira/browse/IO-224
>             Project: Commons IO
>          Issue Type: Improvement
>          Components: Utilities
>    Affects Versions: 1.4
>            Reporter: Sean Cote
>            Assignee: Niall Pemberton
>            Priority: Minor
>             Fix For: 2.0
>
>
> Right now, there are several IOUtils.closeQuietly methods that take things like InputStream, OutputStream, Reader, Writer, but why not simply have one IOUtils.closeQuietly method which takes a Closeable? It seems like this would simplify things and also enhance the usability of the function.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (IO-224) IOUtils.closeQuietly() should take a Closeable as a parameter.

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

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

Sebb commented on IO-224:
-------------------------

URL: http://svn.apache.org/viewvc?rev=920497&view=rev
Log:
IO-224 Add closeQuietly(Socket) to IOUtils


> IOUtils.closeQuietly() should take a Closeable as a parameter.
> --------------------------------------------------------------
>
>                 Key: IO-224
>                 URL: https://issues.apache.org/jira/browse/IO-224
>             Project: Commons IO
>          Issue Type: Improvement
>          Components: Utilities
>    Affects Versions: 1.4
>            Reporter: Sean Cote
>            Assignee: Niall Pemberton
>            Priority: Minor
>             Fix For: 2.0
>
>
> Right now, there are several IOUtils.closeQuietly methods that take things like InputStream, OutputStream, Reader, Writer, but why not simply have one IOUtils.closeQuietly method which takes a Closeable? It seems like this would simplify things and also enhance the usability of the function.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.