mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 18:17:43 +00:00
fixes for codacy issues
This commit is contained in:
parent
e9bb6ed8f1
commit
05fe1c16c4
@ -246,7 +246,7 @@ public final class FilteredEventsModel {
|
||||
//because there is no way to remove a datasource we only add to this map.
|
||||
for (Long id : dataSourceIDs) {
|
||||
try {
|
||||
if (datasourcesMap.containsKey(id) == false) {
|
||||
if (datasourcesMap.get(id) == null) {
|
||||
datasourcesMap.put(id, skCase.getDataSource(id));
|
||||
}
|
||||
} catch (TskDataException ex) {
|
||||
@ -663,7 +663,7 @@ public final class FilteredEventsModel {
|
||||
return updatedEventIDs;
|
||||
}
|
||||
|
||||
synchronized void invalidateAllCaches() throws TskCoreException {
|
||||
synchronized protected void invalidateAllCaches() throws TskCoreException {
|
||||
minCache.invalidateAll();
|
||||
maxCache.invalidateAll();
|
||||
idToEventCache.invalidateAll();
|
||||
|
@ -40,7 +40,6 @@ import javafx.beans.property.ReadOnlyObjectProperty;
|
||||
import javafx.beans.property.ReadOnlyObjectWrapper;
|
||||
import javafx.beans.property.ReadOnlyStringProperty;
|
||||
import javafx.beans.property.ReadOnlyStringWrapper;
|
||||
import javafx.beans.value.ObservableValue;
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.collections.ObservableList;
|
||||
import javafx.collections.ObservableSet;
|
||||
@ -56,7 +55,6 @@ import org.joda.time.Interval;
|
||||
import org.joda.time.ReadablePeriod;
|
||||
import org.joda.time.format.DateTimeFormat;
|
||||
import org.joda.time.format.DateTimeFormatter;
|
||||
import org.openide.util.Exceptions;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import static org.sleuthkit.autopsy.casemodule.Case.Events.CURRENT_CASE;
|
||||
@ -76,8 +74,10 @@ import org.sleuthkit.autopsy.ingest.IngestManager;
|
||||
import org.sleuthkit.autopsy.ingest.ModuleDataEvent;
|
||||
import org.sleuthkit.autopsy.timeline.events.ViewInTimelineRequestedEvent;
|
||||
import org.sleuthkit.autopsy.timeline.ui.detailview.datamodel.DetailViewEvent;
|
||||
import org.sleuthkit.autopsy.timeline.ui.filtering.datamodel.FilterState;
|
||||
import org.sleuthkit.autopsy.timeline.ui.filtering.datamodel.RootFilterState;
|
||||
import org.sleuthkit.autopsy.timeline.utils.IntervalUtils;
|
||||
import org.sleuthkit.autopsy.timeline.zooming.TimeUnits;
|
||||
import org.sleuthkit.autopsy.timeline.zooming.ZoomState;
|
||||
import org.sleuthkit.datamodel.AbstractFile;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||
@ -85,8 +85,6 @@ import org.sleuthkit.datamodel.DescriptionLoD;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
import org.sleuthkit.datamodel.timeline.EventType;
|
||||
import org.sleuthkit.datamodel.timeline.EventTypeZoomLevel;
|
||||
import org.sleuthkit.autopsy.timeline.ui.filtering.datamodel.FilterState;
|
||||
import org.sleuthkit.autopsy.timeline.zooming.TimeUnits;
|
||||
import org.sleuthkit.datamodel.timeline.TimelineFilter.DescriptionFilter;
|
||||
import org.sleuthkit.datamodel.timeline.TimelineFilter.EventTypeFilter;
|
||||
|
||||
@ -283,7 +281,7 @@ public class TimeLineController {
|
||||
* TimeLineController. Do we need to do this with datasource or hash hit
|
||||
* filters?
|
||||
*/
|
||||
historyManager.currentState().addListener(( observable, oldState, newState) -> {
|
||||
historyManager.currentState().addListener((observable, oldState, newState) -> {
|
||||
ZoomState historyManagerState = newState;
|
||||
filteredEvents.syncFilters(historyManagerState.getFilterState());
|
||||
currentParams.set(historyManagerState);
|
||||
|
@ -22,7 +22,6 @@ import java.util.Arrays;
|
||||
import javafx.application.Platform;
|
||||
import javafx.beans.InvalidationListener;
|
||||
import javafx.beans.binding.Bindings;
|
||||
import javafx.beans.binding.BooleanBinding;
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.collections.ObservableMap;
|
||||
import javafx.fxml.FXML;
|
||||
@ -44,7 +43,6 @@ import org.sleuthkit.autopsy.timeline.FXMLConstructor;
|
||||
import org.sleuthkit.autopsy.timeline.FilteredEventsModel;
|
||||
import org.sleuthkit.autopsy.timeline.TimeLineController;
|
||||
import org.sleuthkit.autopsy.timeline.actions.ResetFilters;
|
||||
import org.sleuthkit.autopsy.timeline.ui.filtering.datamodel.CompoundFilterState;
|
||||
import org.sleuthkit.autopsy.timeline.ui.filtering.datamodel.FilterState;
|
||||
import org.sleuthkit.autopsy.timeline.ui.filtering.datamodel.RootFilterState;
|
||||
import org.sleuthkit.datamodel.timeline.TimelineFilter;
|
||||
|
@ -28,6 +28,14 @@ import javafx.collections.ObservableList;
|
||||
import org.sleuthkit.datamodel.timeline.TimelineFilter;
|
||||
import org.sleuthkit.datamodel.timeline.TimelineFilter.CompoundFilter;
|
||||
|
||||
/**
|
||||
*
|
||||
* Defualt implementation of CompoundFilterState
|
||||
*
|
||||
* @param <SubFilterType> The type of the subfilters in the underlying
|
||||
* CompoundFilter
|
||||
* @param <FilterType> The type of the underlying CompoundFilter
|
||||
*/
|
||||
class CompoundFilterStateImpl<SubFilterType extends TimelineFilter, FilterType extends CompoundFilter<SubFilterType>>
|
||||
extends DefaultFilterState<FilterType>
|
||||
implements CompoundFilterState<SubFilterType, FilterType> {
|
||||
|
@ -22,6 +22,8 @@ import javafx.beans.property.ReadOnlyBooleanProperty;
|
||||
import javafx.beans.property.ReadOnlyBooleanWrapper;
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.collections.ObservableList;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import static org.apache.commons.lang3.ObjectUtils.notEqual;
|
||||
import org.sleuthkit.datamodel.timeline.TimelineFilter;
|
||||
import org.sleuthkit.datamodel.timeline.TimelineFilter.DataSourceFilter;
|
||||
import org.sleuthkit.datamodel.timeline.TimelineFilter.DataSourcesFilter;
|
||||
@ -199,24 +201,19 @@ public class RootFilterState implements CompoundFilterState< TimelineFilter, Roo
|
||||
RootFilter activeFilter = getActiveFilter();
|
||||
RootFilter activeFilter1 = otherFilterState.getActiveFilter();
|
||||
|
||||
if (false == activeFilter.equals(activeFilter1)) {
|
||||
if (notEqual(activeFilter, activeFilter1)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
RootFilter filter = getFilter();
|
||||
RootFilter filter1 = otherFilterState.getFilter();
|
||||
|
||||
if (false == filter.equals(filter1)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return filter.equals(filter1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 7;
|
||||
|
||||
return hash;
|
||||
return 7;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user