core-libs-dev Digest, Vol 13, Issue 1

David M. Lloyd david.lloyd at
Mon May 5 12:54:28 UTC 2008

On 05/03/2008 08:40 AM, Paulo Levi wrote:
> Is it possible to make the java.sql interface Connection, Statement and
> ResultSet descend from closeable?

Not that I'm aware of, since SQLException doesn't extend IOException.  That 
said, it might be nice to have a java.sql.Closeable for some future JDBC...

I guess once you have that, you could do a java.lang.Closeable with a close 
method that throws Exception, and derive both and 
java.sql.Closeable from that. :-)

Though I'm not 100% certain what impact inserting an interface above in the heirarchy would have on backwards compatibility.


More information about the core-libs-dev mailing list