mirror of
https://github.com/elisspace/autopsy.git
synced 2026-09-03 22:39:56 +00:00
cleanup
This commit is contained in:
@@ -18,26 +18,15 @@
|
||||
*/
|
||||
package org.sleuthkit.autopsy.timeline;
|
||||
|
||||
import org.sleuthkit.autopsy.timeline.utils.CacheLoaderImpl;
|
||||
import com.google.common.cache.CacheBuilder;
|
||||
import com.google.common.cache.CacheLoader;
|
||||
import com.google.common.cache.LoadingCache;
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.SetMultimap;
|
||||
import com.google.common.eventbus.EventBus;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@@ -53,10 +42,8 @@ import javafx.collections.ObservableList;
|
||||
import javafx.collections.ObservableMap;
|
||||
import javafx.collections.ObservableSet;
|
||||
import javafx.collections.SetChangeListener;
|
||||
import org.apache.commons.lang3.tuple.ImmutablePair;
|
||||
import org.joda.time.DateTimeZone;
|
||||
import org.joda.time.Interval;
|
||||
import org.joda.time.Period;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.events.BlackBoardArtifactTagAddedEvent;
|
||||
import org.sleuthkit.autopsy.casemodule.events.BlackBoardArtifactTagDeletedEvent;
|
||||
@@ -69,9 +56,7 @@ import org.sleuthkit.autopsy.events.AutopsyEvent;
|
||||
import org.sleuthkit.autopsy.timeline.events.RefreshRequestedEvent;
|
||||
import org.sleuthkit.autopsy.timeline.events.TagsAddedEvent;
|
||||
import org.sleuthkit.autopsy.timeline.events.TagsDeletedEvent;
|
||||
import org.sleuthkit.autopsy.timeline.ui.detailview.datamodel.EventCluster;
|
||||
import org.sleuthkit.autopsy.timeline.ui.detailview.datamodel.EventStripe;
|
||||
import org.sleuthkit.autopsy.timeline.ui.listvew.datamodel.CombinedEvent;
|
||||
import org.sleuthkit.autopsy.timeline.utils.CacheLoaderImpl;
|
||||
import org.sleuthkit.autopsy.timeline.utils.CheckedFunction;
|
||||
import org.sleuthkit.datamodel.AbstractFile;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||
@@ -86,7 +71,6 @@ import org.sleuthkit.datamodel.TskCoreException;
|
||||
import org.sleuthkit.datamodel.timeline.DescriptionLoD;
|
||||
import org.sleuthkit.datamodel.timeline.EventType;
|
||||
import org.sleuthkit.datamodel.timeline.EventTypeZoomLevel;
|
||||
import org.sleuthkit.datamodel.timeline.RangeDivisionInfo;
|
||||
import org.sleuthkit.datamodel.timeline.SingleEvent;
|
||||
import org.sleuthkit.datamodel.timeline.ZoomParams;
|
||||
import org.sleuthkit.datamodel.timeline.filters.DataSourceFilter;
|
||||
|
||||
@@ -167,7 +167,6 @@ final public class DetailsViewModel {
|
||||
// perform query and map results to AggregateEvent objects
|
||||
List<EventCluster> events = new ArrayList<>();
|
||||
|
||||
sleuthkitCase.acquireSingleUserCaseReadLock();
|
||||
try (SleuthkitCase.CaseDbQuery dbQuery = sleuthkitCase.executeQuery(querySql);
|
||||
ResultSet resultSet = dbQuery.getResultSet();) {
|
||||
while (resultSet.next()) {
|
||||
@@ -175,8 +174,6 @@ final public class DetailsViewModel {
|
||||
}
|
||||
} catch (SQLException ex) {
|
||||
logger.log(Level.SEVERE, "Failed to get events with query: " + querySql, ex); // NON-NLS
|
||||
} finally {
|
||||
sleuthkitCase.releaseSingleUserCaseReadLock();
|
||||
}
|
||||
|
||||
return mergeClustersToStripes(rangeInfo.getPeriodSize().getPeriod(), events);
|
||||
@@ -276,5 +273,4 @@ final public class DetailsViewModel {
|
||||
|
||||
return stripeDescMap.values().stream().sorted(Comparator.comparing(EventStripe::getStartMillis)).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ import org.sleuthkit.datamodel.timeline.EventType;
|
||||
import org.sleuthkit.datamodel.timeline.filters.RootFilter;
|
||||
|
||||
/**
|
||||
*
|
||||
* Model for the ListView.
|
||||
*
|
||||
*/
|
||||
public class ListViewModel {
|
||||
@@ -93,7 +93,6 @@ public class ListViewModel {
|
||||
+ " WHERE time >= " + startTime + " AND time <" + endTime + " AND " + eventManager.getSQLWhere(filter)
|
||||
+ " GROUP BY time, full_description, file_id ORDER BY time ASC, full_description";
|
||||
|
||||
sleuthkitCase.acquireSingleUserCaseReadLock();
|
||||
try (SleuthkitCase.CaseDbQuery dbQuery = sleuthkitCase.executeQuery(querySql);
|
||||
ResultSet resultSet = dbQuery.getResultSet();) {
|
||||
|
||||
@@ -112,11 +111,8 @@ public class ListViewModel {
|
||||
|
||||
} catch (SQLException sqlEx) {
|
||||
throw new TskCoreException("Failed to execute query for combined events: \n" + querySql, sqlEx); // NON-NLS
|
||||
} finally {
|
||||
sleuthkitCase.releaseSingleUserCaseReadLock();
|
||||
}
|
||||
|
||||
return combinedEvents;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user