diff options
author | James Moger <james.moger@gitblit.com> | 2014-10-30 09:40:21 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-10-30 09:40:21 -0400 |
commit | ccbdddcf18d892859f9200b2c9285b5cd771d575 (patch) | |
tree | 613e2f4e18b4c6e13a13df11435dd9a125bb7ad0 /src/main/java/com | |
parent | 8d28bc740c9bcb76186e7572f74a144397e780ce (diff) | |
download | iciql-ccbdddcf18d892859f9200b2c9285b5cd771d575.tar.gz iciql-ccbdddcf18d892859f9200b2c9285b5cd771d575.zip |
Implement auto-closable interface on Db
Diffstat (limited to 'src/main/java/com')
-rw-r--r-- | src/main/java/com/iciql/Db.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/com/iciql/Db.java b/src/main/java/com/iciql/Db.java index 179b18d..ebcd352 100644 --- a/src/main/java/com/iciql/Db.java +++ b/src/main/java/com/iciql/Db.java @@ -51,7 +51,7 @@ import com.iciql.util.WeakIdentityHashMap; * This class represents a connection to a database.
*/
-public class Db {
+public class Db implements AutoCloseable {
/**
* This map It holds unique tokens that are generated by functions such as
@@ -458,6 +458,7 @@ public class Db { return conn;
}
+ @Override
public void close() {
try {
conn.close();
|