[
http://jira.amdatu.org/jira/browse/AMDATU-514?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12286#comment-12286
]
Jan Willem Janssen commented on AMDATU-514:
-------------------------------------------
@Matthijs:
not entirely: closeSteamSafely should not throw IOException (and if you're
going fancy wrap the close in a null-check), this would be the "safe"
variant... It allows you to close a Closeable implementation in a finally
clause without hiding exceptions that might occurred prior to the
finally-clause. This is actually solved in Java 7, but that is not what we're
using at the moment...
Aside that: I believe that IOUtils of Apache commons already provides a similar
implementation...
> Code review: libraries.fsstorage
> --------------------------------
>
> Key: AMDATU-514
> URL: http://jira.amdatu.org/jira/browse/AMDATU-514
> Project: Amdatu
> Issue Type: Improvement
> Components: Amdatu Core
> Reporter: Jan Willem Janssen
> Labels: code_review
> Fix For: Sprint 2
>
>
> My comments:
> * FSStorageUtil#close{Input|Output}StreamsSafely: all InputStream- &
> OutputStream-derived classes implement the Closable interface; you can use
> that one to coerse both methods into a single method. The two arguments can
> also be coerced into a single argument, if you derive a ObjectInputStream
> from another stream calling close() on the ObjectInputStream will also close
> the contained stream (defined in the contract).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
http://jira.amdatu.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
Amdatu-developers mailing list
[email protected]
http://lists.amdatu.org/mailman/listinfo/amdatu-developers