Enhancement 413 : QueryIterator should extend java.io.Closeable
Priority 
Low
Reported Version 
 
Logged By 
Jared Stehler
Status 
Fixed
Fixed Version 
2.8.1
Assigned To 
 
Product 
Ebean - core
Duplicate Of 
 
Created 
19/07/2012
Updated 
19/07/2012
Type 
Enhancement
 
Attachments 
No attachments

Java provides an interface (since 1.5) for marking objects as being 'closeable', which enables some nice library functions like IOUtils.closeQuietly(..). It would be nice if the QueryIterator interface extended this interface, which has the single method definition:

public void close() throws IOException

Then, I can write methods which deal generically with iterators, and say something like:

if( it instanceof Closeable ) { IOUtils.closeQuietly( (Closeable) it ); }

 
Rob 29 Jul 08:46
Fixed in HEAD

Fixed in HEAD.

woResponse

Upload a file