Don't mind the rename, but why would you need varargs?
I don't think that would be much cleaner than simply calling
Closer.closeSilently(a);
Closer.closeSilently(b);
...

(And Closeable is only for io stuff (streams, files, ...). For database
stuff like Statement, ResultSet, Connection you need separate methods
anyway.)


On Thu, Jun 26, 2014 at 12:02 AM, Matt Sicker <boa...@gmail.com> wrote:

> I like calling it closeSilently(). And for varargs, I propose just adding
> an additional method that takes things like close(Closeable c, Closeable...
> more) or something like that.
>
>
> On 24 June 2014 23:18, Gary Gregory <garydgreg...@gmail.com> wrote:
>
>> I just found a bunch of handy
>> org.apache.logging.log4j.core.util.Closer.closeSilent() methods, very nice,
>> I just reused one in a test. BUT these should be called IMO closeSilently().
>>
>> They also should be varargs methinks.
>>
>> Gary
>>
>> --
>> E-Mail: garydgreg...@gmail.com | ggreg...@apache.org
>> Java Persistence with Hibernate, Second Edition
>> <http://www.manning.com/bauer3/>
>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>> Spring Batch in Action <http://www.manning.com/templier/>
>> Blog: http://garygregory.wordpress.com
>> Home: http://garygregory.com/
>> Tweet! http://twitter.com/GaryGregory
>>
>
>
>
> --
> Matt Sicker <boa...@gmail.com>
>

Reply via email to