From fc01fcd48d095c7bd71d50be34d10ff8e042e63d Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Tue, 2 Jun 2020 11:58:35 -0400 Subject: [PATCH] fix for codacy and commenting issues --- .../autopsy/geolocation/GeolocationTopComponent.java | 3 --- .../geolocation/datamodel/GeoLocationParseResult.java | 9 +++------ .../autopsy/geolocation/datamodel/WaypointBuilder.java | 1 - .../sleuthkit/autopsy/report/modules/kml/KMLReport.java | 1 - 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/geolocation/GeolocationTopComponent.java b/Core/src/org/sleuthkit/autopsy/geolocation/GeolocationTopComponent.java index 38523c1a9d..31ef953fdc 100755 --- a/Core/src/org/sleuthkit/autopsy/geolocation/GeolocationTopComponent.java +++ b/Core/src/org/sleuthkit/autopsy/geolocation/GeolocationTopComponent.java @@ -50,9 +50,6 @@ import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil; import org.sleuthkit.autopsy.coreutils.ThreadConfined; import org.sleuthkit.autopsy.geolocation.GeoFilterPanel.GeoFilter; import org.sleuthkit.autopsy.geolocation.datamodel.GeoLocationDataException; -import org.sleuthkit.autopsy.geolocation.datamodel.GeoLocationParseResult; -import org.sleuthkit.autopsy.geolocation.datamodel.Track; -import org.sleuthkit.autopsy.geolocation.datamodel.Waypoint; import org.sleuthkit.autopsy.ingest.IngestManager; import static org.sleuthkit.autopsy.ingest.IngestManager.IngestModuleEvent.DATA_ADDED; import org.sleuthkit.autopsy.ingest.ModuleDataEvent; diff --git a/Core/src/org/sleuthkit/autopsy/geolocation/datamodel/GeoLocationParseResult.java b/Core/src/org/sleuthkit/autopsy/geolocation/datamodel/GeoLocationParseResult.java index db5502541d..2089bc2cb6 100644 --- a/Core/src/org/sleuthkit/autopsy/geolocation/datamodel/GeoLocationParseResult.java +++ b/Core/src/org/sleuthkit/autopsy/geolocation/datamodel/GeoLocationParseResult.java @@ -23,12 +23,12 @@ import java.util.List; import org.python.google.common.collect.ImmutableList; /** - * The result of attempting to parse a GeoLocation object. + * The result of attempting to parse GeoLocation objects. */ public class GeoLocationParseResult { private boolean successfullyParsed; - private List items = new ArrayList<>(); + private final List items = new ArrayList<>(); /** * Returns a GeoLocationParseResult with no items and declared successfully @@ -61,10 +61,7 @@ public class GeoLocationParseResult { * @param toAdd The GeoLocationParseResult to add. */ public void add(GeoLocationParseResult toAdd) { - this.successfullyParsed = (this.successfullyParsed == false) - ? false - : toAdd.isSuccessfullyParsed(); - + this.successfullyParsed = this.successfullyParsed && toAdd.isSuccessfullyParsed(); this.items.addAll(toAdd.getItems()); } diff --git a/Core/src/org/sleuthkit/autopsy/geolocation/datamodel/WaypointBuilder.java b/Core/src/org/sleuthkit/autopsy/geolocation/datamodel/WaypointBuilder.java index 9f86cb2065..076ac8b8f9 100755 --- a/Core/src/org/sleuthkit/autopsy/geolocation/datamodel/WaypointBuilder.java +++ b/Core/src/org/sleuthkit/autopsy/geolocation/datamodel/WaypointBuilder.java @@ -25,7 +25,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.logging.Level; -import java.util.stream.Collectors; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.datamodel.BlackboardArtifact; import org.sleuthkit.datamodel.BlackboardArtifact.ARTIFACT_TYPE; diff --git a/Core/src/org/sleuthkit/autopsy/report/modules/kml/KMLReport.java b/Core/src/org/sleuthkit/autopsy/report/modules/kml/KMLReport.java index c9e70cb185..607b8879fe 100644 --- a/Core/src/org/sleuthkit/autopsy/report/modules/kml/KMLReport.java +++ b/Core/src/org/sleuthkit/autopsy/report/modules/kml/KMLReport.java @@ -33,7 +33,6 @@ import java.io.OutputStream; import java.nio.file.Path; import java.nio.file.Paths; import java.text.SimpleDateFormat; -import java.util.ArrayList; import java.util.List; import java.util.logging.Level; import java.util.stream.Collectors;