-
Type: Improvement
-
Status: Open
-
Priority: Minor
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: QualifiedToSchedule
Java 7's AutoCloseable allows the use of the new try-with-resource pattern that automatically does a close() at the end of the try block.
We could implement this interface in our code in a number of places, among them:
- IterableQueryResult
- directory Session
Then code using these could be simplified to avoid a verbose finally block.
We can also make use of AutoCloseable classes now available in Java 7, among them:
- java.sql.Statement
- InputStream, OutputStream, Reader, Writer
- Socket