From 13ca2ad8afe6db70d4db280c6ee63a4845f8eea3 Mon Sep 17 00:00:00 2001 From: Andrew Ziehl Date: Tue, 29 May 2018 10:00:29 -0700 Subject: [PATCH] Fix for removing current correlation case from common files data sources. --- .../autopsy/commonfilesearch/CommonFilesPanel.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesPanel.java b/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesPanel.java index f691b9bde5..1cc810e08c 100644 --- a/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesPanel.java +++ b/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesPanel.java @@ -343,11 +343,13 @@ public final class CommonFilesPanel extends javax.swing.JPanel { } } - private Map mapDataSources(List cases) { + private Map mapDataSources(List cases) throws Exception { Map casemap = new HashMap<>(); - + CorrelationCase currentCorCase = EamDb.getInstance().getCase(Case.getCurrentCase()); for (CorrelationCase correlationCase : cases) { - casemap.put(correlationCase.getID(), correlationCase.getDisplayName()); + if(currentCorCase.getID() != correlationCase.getID()) { // if not the current Case + casemap.put(correlationCase.getID(), correlationCase.getDisplayName()); + } } return casemap; @@ -357,7 +359,6 @@ public final class CommonFilesPanel extends javax.swing.JPanel { protected Map doInBackground() throws Exception { List dataSources = EamDb.getInstance().getCases(); - dataSources.remove(EamDb.getInstance().getCase(Case.getCurrentCase())); Map caseMap = mapDataSources(dataSources); return caseMap;