We try to avoid external dependencies, including Apache Commons.

Take a look if it is possible to use try-with-resources statement.

Thank you,
William

2017-04-16 8:46 GMT-03:00 Jeff Zemerick <jzemer...@apache.org>:

> In cases of code like this when closing a stream:
>
>     finally {
>       try {
>         sampleStream.close();
>       } catch (IOException e) {
>         // sorry that this can fail
>       }
>     }
>
> I thought it might be a bit cleaner looking to replace the empty try/catch
> with Apache Commons IO's IOUtils.closeQuietly(). I noticed that the Apache
> Commons IO dependency's scope is currently set to <scope>test</scope>. If
> you agree that the code change would be cleaner, is there any problem with
> changing that dependency to a compile dependency instead of test?
>
> Thanks,
> Jeff
>

Reply via email to