aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-07-14 14:24:18 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-07-14 14:24:18 +1200
commitd4046ab7c92eef41e0c1cce013141ecaf0c9e317 (patch)
tree51ef2117a2aba878d389dc05ea149fc00543e041 /src/org/traccar/database
parentc21773be3d8e5626f3830e35af8a6659cae24522 (diff)
downloadtrackermap-server-d4046ab7c92eef41e0c1cce013141ecaf0c9e317.tar.gz
trackermap-server-d4046ab7c92eef41e0c1cce013141ecaf0c9e317.tar.bz2
trackermap-server-d4046ab7c92eef41e0c1cce013141ecaf0c9e317.zip
Use try with resources
Diffstat (limited to 'src/org/traccar/database')
-rw-r--r--src/org/traccar/database/QueryBuilder.java7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/org/traccar/database/QueryBuilder.java b/src/org/traccar/database/QueryBuilder.java
index 85881a736..17165db82 100644
--- a/src/org/traccar/database/QueryBuilder.java
+++ b/src/org/traccar/database/QueryBuilder.java
@@ -292,9 +292,7 @@ public class QueryBuilder {
try {
- ResultSet resultSet = statement.executeQuery();
-
- try {
+ try (ResultSet resultSet = statement.executeQuery()) {
ResultSetMetaData resultMetaData = resultSet.getMetaData();
@@ -392,9 +390,6 @@ public class QueryBuilder {
}
result.add(object);
}
-
- } finally {
- resultSet.close();
}
} finally {