[
https://issues.apache.org/jira/browse/MAHOUT-1211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13675280#comment-13675280
]
Dmitriy Lyubimov commented on MAHOUT-1211:
------------------------------------------
I am having deja vu of this discussion with Sean some time ago (I guess i
couldn't convince him of harm of closeQuietly)
bq. In other words, there is no practical difference between write() throwing
an exception and close() throwing an exception, for writables.
My then-point exactly.
bq. So, the patch here has close(XXX, true), are we saying we should do false?
yes.
bq. My suggestion is essentially "true" for readers, "false" for writers....
The idea is that if you can't clean up after you've fully read a stream,
there's not much you can do but proceed
-1. There's a reason reader throws a generic exception. If a reader deems
there's been no harm done to I/O subsystem or data integrity and it is ok to
recover, it would've not have a reason to signal anything. E.g. it might be a
bad protocol signature or trailer thus previously read data is somehow
deficient. In practice it is probably not so often the case but it is implied
by the contract and it doesn't really matter how rare it is in practice as long
as it holds true for at least one case.
> Replace deprecated Closables.closeQuietly calls
> -----------------------------------------------
>
> Key: MAHOUT-1211
> URL: https://issues.apache.org/jira/browse/MAHOUT-1211
> Project: Mahout
> Issue Type: Improvement
> Reporter: Stevo Slavic
> Assignee: Ted Dunning
> Priority: Minor
> Fix For: 0.8
>
> Attachments: MAHOUT-1211.patch
>
>
> Deprecated Guava {{Closables.closeQuietly}} API has to be replaced, it's
> usage is a code smell, and that method is scheduled to be removed from Guava
> 16.0.
> See [this
> discussion|https://code.google.com/p/guava-libraries/issues/detail?id=1118]
> for more info.
--
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