DaveAKing / guava-libraries

Automatically exported from code.google.com/p/guava-libraries
Apache License 2.0
0 stars 0 forks source link

Closeables needs closeQuietly() method #1709

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
There is no point of surrounding the

Closeables.close(Closeable, boolean)

with IOException try-catch clause if the second parameter is true.
I suggest adding a method

Closeables.closeQuietly(Closeable)

So there is no need to write unnecessary try-catch clause.

Original issue reported on code.google.com by jaroslav...@lemberg.co.uk on 31 Mar 2014 at 1:58

GoogleCodeExporter commented 9 years ago
The method documentation explains the use case that the method is designed for:

http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/io/Clos
eables.html#close%28java.io.Closeable,%20boolean%29

For more on closeQuietly, see issue 1118.

Original comment by cpov...@google.com on 31 Mar 2014 at 2:02

GoogleCodeExporter commented 9 years ago
This issue has been migrated to GitHub.

It can be found at https://github.com/google/guava/issues/<id>

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:09

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 3 Nov 2014 at 9:07