From d1fa7c0cd1343b028d4707b1d31c23feda38521b Mon Sep 17 00:00:00 2001 From: Andrew Ziehl Date: Wed, 9 May 2018 12:46:37 -0700 Subject: [PATCH] Codeacy cleanup --- .../contentviewer/DataContentViewerOtherCases.java | 5 ++++- .../autopsy/commonfilesearch/FileInstanceMetadata.java | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java index e587a96cb5..ca9b0e2c06 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java @@ -464,7 +464,9 @@ public class DataContentViewerOtherCases extends javax.swing.JPanel implements D .filter(artifactInstance -> !artifactInstance.getCorrelationCase().getCaseUUID().equals(caseUUID) || !artifactInstance.getCorrelationDataSource().getName().equals(dataSourceName) || !artifactInstance.getCorrelationDataSource().getDeviceID().equals(deviceId)) - .collect(Collectors.toMap(c -> new ArtifactKey(c.getCorrelationDataSource().getDeviceID(), c.getFilePath()), c -> c))); + .collect(Collectors.toMap( + correlationAttr -> new ArtifactKey(correlationAttr.getCorrelationDataSource().getDeviceID(), correlationAttr.getFilePath()), + correlationAttr -> correlationAttr))); } if (corAttr.getCorrelationType().getDisplayName().equals("Files")) { @@ -482,6 +484,7 @@ public class DataContentViewerOtherCases extends javax.swing.JPanel implements D } catch (TskCoreException ex) { // do nothing. // @@@ Review this behavior + LOGGER.log(Level.SEVERE, "Exception while querying open case.", ex); // NON-NLS } return new HashMap<>(0); diff --git a/Core/src/org/sleuthkit/autopsy/commonfilesearch/FileInstanceMetadata.java b/Core/src/org/sleuthkit/autopsy/commonfilesearch/FileInstanceMetadata.java index 0d0b3e9844..0e53cc6992 100644 --- a/Core/src/org/sleuthkit/autopsy/commonfilesearch/FileInstanceMetadata.java +++ b/Core/src/org/sleuthkit/autopsy/commonfilesearch/FileInstanceMetadata.java @@ -24,8 +24,8 @@ package org.sleuthkit.autopsy.commonfilesearch; */ final public class FileInstanceMetadata { - private Long objectId; - private String dataSourceName; + private final Long objectId; + private final String dataSourceName; /** * Create meta data required to find an abstract file and build a FileInstanceNode.