Closed resources in GalleryController
This commit is contained in:
parent
34d01f6934
commit
d2b64760ce
@ -64,13 +64,14 @@ public class GalleryController {
|
|||||||
while (rs.next()) {
|
while (rs.next()) {
|
||||||
galleries.add(mapObject(rs));
|
galleries.add(mapObject(rs));
|
||||||
}
|
}
|
||||||
rs.getStatement().close();
|
FSDB.get().close(rs);
|
||||||
|
|
||||||
return galleries;
|
return galleries;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean galleryExistsExec(String channelId) throws SQLException {
|
private static boolean galleryExistsExec(String channelId) throws SQLException {
|
||||||
ResultSet rs = FSDB.get().select("SELECT EXISTS(SELECT 1 FROM galleries WHERE channel_id = ?) AS hmm", channelId);
|
ResultSet rs = FSDB.get().select("SELECT EXISTS(SELECT 1 FROM galleries WHERE channel_id = ?) AS hmm", channelId);
|
||||||
|
FSDB.get().close(rs);
|
||||||
|
|
||||||
return rs.getBoolean("hmm");
|
return rs.getBoolean("hmm");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user