diff --git a/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesPanel.java b/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesPanel.java index c2961abacc..6b8fada124 100644 --- a/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesPanel.java +++ b/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesPanel.java @@ -134,8 +134,9 @@ public final class CommonFilesPanel extends javax.swing.JPanel { private void loadLogicalSources(SleuthkitCase tskDb, Map dataSouceMap) throws TskCoreException, SQLException { //try block releases resources - exceptions are handled in done() - try (CaseDbQuery query = tskDb.executeQuery(SELECT_DATA_SOURCES_LOGICAL)) { - ResultSet resultSet = query.getResultSet(); + try ( + CaseDbQuery query = tskDb.executeQuery(SELECT_DATA_SOURCES_LOGICAL); + ResultSet resultSet = query.getResultSet()) { while (resultSet.next()) { Long objectId = resultSet.getLong(1); String dataSourceName = resultSet.getString(2);