On 31/10/2017 00:49, Gary Gregory wrote:
> Hi All:
> 
> Several [pool] interfaces implement close() but do not extend Closeable.
> Should they?

I'm tempted. close() is part of the ObjectPool interface so it isn't as
if we are adding new functionality.

My only concern is that the Javadoc for Closeable is written as if
Closeable is for I/O streams rather than the more general resource case.
Looking at the Javadoc further, URLClassLoader implements Closeable so
if it is good enough for the JRE...

+1 to having all the Pool implementations implement Closeable in 2.4.x
onwards.

> Now that we are on Java 7, AutoCloseable is also available.
> 
> Thoughts? Pros, Cons?

If we implement Closeable then we get AutoCloseable for free.

Mark


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

Reply via email to