summaryrefslogtreecommitdiffstats
path: root/src/main/java/com
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-10-30 09:40:21 -0400
committerJames Moger <james.moger@gitblit.com>2014-10-30 09:40:21 -0400
commitccbdddcf18d892859f9200b2c9285b5cd771d575 (patch)
tree613e2f4e18b4c6e13a13df11435dd9a125bb7ad0 /src/main/java/com
parent8d28bc740c9bcb76186e7572f74a144397e780ce (diff)
downloadiciql-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.java3
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();