mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-19 19:14:55 +00:00
added a result set to a try-with-resources block
This commit is contained in:
parent
9518ef3c61
commit
2afcc99111
@ -134,8 +134,9 @@ public final class CommonFilesPanel extends javax.swing.JPanel {
|
|||||||
|
|
||||||
private void loadLogicalSources(SleuthkitCase tskDb, Map<Long, String> dataSouceMap) throws TskCoreException, SQLException {
|
private void loadLogicalSources(SleuthkitCase tskDb, Map<Long, String> dataSouceMap) throws TskCoreException, SQLException {
|
||||||
//try block releases resources - exceptions are handled in done()
|
//try block releases resources - exceptions are handled in done()
|
||||||
try (CaseDbQuery query = tskDb.executeQuery(SELECT_DATA_SOURCES_LOGICAL)) {
|
try (
|
||||||
ResultSet resultSet = query.getResultSet();
|
CaseDbQuery query = tskDb.executeQuery(SELECT_DATA_SOURCES_LOGICAL);
|
||||||
|
ResultSet resultSet = query.getResultSet()) {
|
||||||
while (resultSet.next()) {
|
while (resultSet.next()) {
|
||||||
Long objectId = resultSet.getLong(1);
|
Long objectId = resultSet.getLong(1);
|
||||||
String dataSourceName = resultSet.getString(2);
|
String dataSourceName = resultSet.getString(2);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user