You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Gary Gregory <ga...@gmail.com> on 2019/11/05 15:10:18 UTC

[IO] Don't deprecate IOUtils#closeQuietly()

Hi All:

I propose that we do NOT deprecate IOUtils#closeQuietly(). There are
use-cases for this method outside of try-with-resources blocks.

For example, I have some wrapper objects that contain Closeable objects.
When the wrapper is closed, I do and want to add calls to
IOUtils#closeQuietly() to avoid null checks in call sites.

Gary

Re: [IO] Don't deprecate IOUtils#closeQuietly()

Posted by David Mollitor <da...@gmail.com>.
Here is a discussion about this topic @ Guava.

https://github.com/google/guava/issues/1118

On Tue, Nov 5, 2019 at 1:14 PM Pascal Schumacher <pa...@gmx.net>
wrote:

> +1, for removing the deprecatio
>
> Am 05.11.2019 um 16:10 schrieb Gary Gregory:
> > Hi All:
> >
> > I propose that we do NOT deprecate IOUtils#closeQuietly(). There are
> > use-cases for this method outside of try-with-resources blocks.
> >
> > For example, I have some wrapper objects that contain Closeable objects.
> > When the wrapper is closed, I do and want to add calls to
> > IOUtils#closeQuietly() to avoid null checks in call sites.
> >
> > Gary
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

Re: [IO] Don't deprecate IOUtils#closeQuietly()

Posted by Pascal Schumacher <pa...@gmx.net>.
+1, for removing the deprecatio

Am 05.11.2019 um 16:10 schrieb Gary Gregory:
> Hi All:
>
> I propose that we do NOT deprecate IOUtils#closeQuietly(). There are
> use-cases for this method outside of try-with-resources blocks.
>
> For example, I have some wrapper objects that contain Closeable objects.
> When the wrapper is closed, I do and want to add calls to
> IOUtils#closeQuietly() to avoid null checks in call sites.
>
> Gary
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [IO] Don't deprecate IOUtils#closeQuietly()

Posted by Claude Warren <cl...@xenei.com>.
+1 I have similar use cases.

On Tue, Nov 5, 2019 at 3:12 PM Gary Gregory <ga...@gmail.com> wrote:

> In this vein, I'd also like to add a null-safe close(Closeable) method.
>
> Gary
>
> On Tue, Nov 5, 2019 at 10:10 AM Gary Gregory <ga...@gmail.com>
> wrote:
>
> > Hi All:
> >
> > I propose that we do NOT deprecate IOUtils#closeQuietly(). There are
> > use-cases for this method outside of try-with-resources blocks.
> >
> > For example, I have some wrapper objects that contain Closeable objects.
> > When the wrapper is closed, I do and want to add calls to
> > IOUtils#closeQuietly() to avoid null checks in call sites.
> >
> > Gary
> >
>


-- 
I like: Like Like - The likeliest place on the web
<http://like-like.xenei.com>
LinkedIn: http://www.linkedin.com/in/claudewarren

Re: [IO] Don't deprecate IOUtils#closeQuietly()

Posted by Gary Gregory <ga...@gmail.com>.
In this vein, I'd also like to add a null-safe close(Closeable) method.

Gary

On Tue, Nov 5, 2019 at 10:10 AM Gary Gregory <ga...@gmail.com> wrote:

> Hi All:
>
> I propose that we do NOT deprecate IOUtils#closeQuietly(). There are
> use-cases for this method outside of try-with-resources blocks.
>
> For example, I have some wrapper objects that contain Closeable objects.
> When the wrapper is closed, I do and want to add calls to
> IOUtils#closeQuietly() to avoid null checks in call sites.
>
> Gary
>