From 7f718148e33896ea626dc43c966f00c6643bb736 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Wed, 9 Sep 2020 14:27:25 -0400 Subject: [PATCH] code cleanup --- .../datamodel/DataSourcePastCasesSummary.java | 14 +++++--------- .../datasourcesummary/ui/PastCasesPanel.java | 12 ++++++------ 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/datasourcesummary/datamodel/DataSourcePastCasesSummary.java b/Core/src/org/sleuthkit/autopsy/datasourcesummary/datamodel/DataSourcePastCasesSummary.java index 020d3eb120..b219049a6e 100644 --- a/Core/src/org/sleuthkit/autopsy/datasourcesummary/datamodel/DataSourcePastCasesSummary.java +++ b/Core/src/org/sleuthkit/autopsy/datasourcesummary/datamodel/DataSourcePastCasesSummary.java @@ -26,13 +26,13 @@ import java.util.stream.Stream; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.tuple.Pair; import org.sleuthkit.autopsy.centralrepository.ingestmodule.CentralRepoIngestModuleFactory; +import org.sleuthkit.autopsy.datasourcesummary.datamodel.SleuthkitCaseProvider.SleuthkitCaseProviderException; import org.sleuthkit.datamodel.BlackboardArtifact; import org.sleuthkit.datamodel.BlackboardArtifact.ARTIFACT_TYPE; import org.sleuthkit.datamodel.BlackboardAttribute; import org.sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE; import org.sleuthkit.datamodel.DataSource; import org.sleuthkit.datamodel.IngestJobInfo; -import org.sleuthkit.datamodel.IngestModuleInfo; import org.sleuthkit.datamodel.TskCoreException; /** @@ -160,8 +160,7 @@ public class DataSourcePastCasesSummary { * instances that case appeared for the given artifact type. The * case is sorted from max to min descending. * - * @throws - * org.sleuthkit.autopsy.datasourcesummary.datamodel.SleuthkitCaseProvider.SleuthkitCaseProviderException + * @throws SleuthkitCaseProviderException * @throws TskCoreException */ private List> getPastCases(DataSource dataSource, ARTIFACT_TYPE artifactType) @@ -215,8 +214,7 @@ public class DataSourcePastCasesSummary { * where an ingest module matches the central repo ingest module * display name. * - * @throws - * org.sleuthkit.autopsy.datasourcesummary.datamodel.SleuthkitCaseProvider.SleuthkitCaseProviderException + * @throws SleuthkitCaseProviderException * @throws TskCoreException */ public boolean isCentralRepoIngested(DataSource dataSource) @@ -245,8 +243,7 @@ public class DataSourcePastCasesSummary { * instances that case appeared. The case is sorted from max to min * descending. * - * @throws - * org.sleuthkit.autopsy.datasourcesummary.datamodel.SleuthkitCaseProvider.SleuthkitCaseProviderException + * @throws SleuthkitCaseProviderException * @throws TskCoreException */ public List> getPastCasesWithNotableFile(DataSource dataSource) @@ -264,8 +261,7 @@ public class DataSourcePastCasesSummary { * instances that case appeared. The case is sorted from max to min * descending. * - * @throws - * org.sleuthkit.autopsy.datasourcesummary.datamodel.SleuthkitCaseProvider.SleuthkitCaseProviderException + * @throws SleuthkitCaseProviderException * @throws TskCoreException */ public List> getPastCasesWithSameId(DataSource dataSource) diff --git a/Core/src/org/sleuthkit/autopsy/datasourcesummary/ui/PastCasesPanel.java b/Core/src/org/sleuthkit/autopsy/datasourcesummary/ui/PastCasesPanel.java index 9aedcd1f3e..c61ade219d 100644 --- a/Core/src/org/sleuthkit/autopsy/datasourcesummary/ui/PastCasesPanel.java +++ b/Core/src/org/sleuthkit/autopsy/datasourcesummary/ui/PastCasesPanel.java @@ -45,7 +45,7 @@ import org.sleuthkit.datamodel.TskCoreException; "PastCasesPanel_caseColumn_title=Case", "PastCasesPanel_countColumn_title=Count", "PastCasesPanel_onNoCrIngest_message=No results will be shown because the Central Repository module was not run." - + }) public class PastCasesPanel extends BaseDataSourceSummaryPanel { @@ -80,7 +80,7 @@ public class PastCasesPanel extends BaseDataSourceSummaryPanel { public PastCasesPanel() { this(new DataSourcePastCasesSummary()); } - + private final DataSourcePastCasesSummary pastCaseData; /** @@ -88,7 +88,7 @@ public class PastCasesPanel extends BaseDataSourceSummaryPanel { */ public PastCasesPanel(DataSourcePastCasesSummary pastCaseData) { this.pastCaseData = pastCaseData; - + // set up data acquisition methods dataFetchComponents = Arrays.asList( // hashset hits loading components @@ -103,7 +103,7 @@ public class PastCasesPanel extends BaseDataSourceSummaryPanel { initComponents(); } - + @Override protected void onNewDataSource(DataSource dataSource) { // if no data source is present or the case is not open, @@ -120,13 +120,13 @@ public class PastCasesPanel extends BaseDataSourceSummaryPanel { } catch (SleuthkitCaseProvider.SleuthkitCaseProviderException | TskCoreException ex) { logger.log(Level.WARNING, "There was an error while determining if dataSource has been central repo ingested.", ex); } - + if (!centralRepoIngested) { // set tables to display loading screen this.tables.forEach((table) -> table.showMessage(Bundle.PastCasesPanel_onNoCrIngest_message())); return; } - + // set tables to display loading screen this.tables.forEach((table) -> table.showDefaultLoadingMessage());