mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-13 00:16:16 +00:00
fixed timeline hang
This commit is contained in:
parent
d0a3dbee31
commit
5112739f02
@ -18,10 +18,10 @@
|
|||||||
*/
|
*/
|
||||||
package org.sleuthkit.autopsy.timeline.ui.detailview.datamodel;
|
package org.sleuthkit.autopsy.timeline.ui.detailview.datamodel;
|
||||||
|
|
||||||
import com.google.common.collect.Sets;
|
|
||||||
import static java.util.Collections.emptySet;
|
import static java.util.Collections.emptySet;
|
||||||
import static java.util.Collections.singleton;
|
import static java.util.Collections.singleton;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
|
import java.util.HashSet;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@ -99,9 +99,26 @@ public class EventCluster implements MultiEvent<EventStripe> {
|
|||||||
|
|
||||||
Interval spanningInterval = IntervalUtils.span(cluster1.span, cluster2.span);
|
Interval spanningInterval = IntervalUtils.span(cluster1.span, cluster2.span);
|
||||||
|
|
||||||
Set<Long> idsUnion = Sets.union(cluster1.getEventIDs(), cluster2.getEventIDs());
|
Set<Long> idsUnion = cluster1.getEventIDs();
|
||||||
Set<Long> hashHitsUnion = Sets.union(cluster1.getEventIDsWithHashHits(), cluster2.getEventIDsWithHashHits());
|
if(!idsUnion.isEmpty()) {
|
||||||
Set<Long> taggedUnion = Sets.union(cluster1.getEventIDsWithTags(), cluster2.getEventIDsWithTags());
|
idsUnion.addAll(cluster2.getEventIDs());
|
||||||
|
} else {
|
||||||
|
idsUnion = cluster2.getEventIDs();
|
||||||
|
}
|
||||||
|
|
||||||
|
Set<Long> hashHitsUnion = cluster1.getEventIDsWithHashHits();
|
||||||
|
if(!hashHitsUnion.isEmpty()) {
|
||||||
|
hashHitsUnion.addAll(cluster2.getEventIDsWithHashHits());
|
||||||
|
} else {
|
||||||
|
hashHitsUnion = cluster2.getEventIDsWithHashHits();
|
||||||
|
}
|
||||||
|
|
||||||
|
Set<Long> taggedUnion = cluster1.getEventIDsWithTags();
|
||||||
|
if(!taggedUnion.isEmpty()) {
|
||||||
|
taggedUnion.addAll(cluster2.getEventIDsWithTags());
|
||||||
|
} else {
|
||||||
|
taggedUnion = cluster2.getEventIDsWithTags();
|
||||||
|
}
|
||||||
|
|
||||||
return new EventCluster(spanningInterval,
|
return new EventCluster(spanningInterval,
|
||||||
cluster1.getEventType(), idsUnion, hashHitsUnion, taggedUnion,
|
cluster1.getEventType(), idsUnion, hashHitsUnion, taggedUnion,
|
||||||
@ -129,13 +146,16 @@ public class EventCluster implements MultiEvent<EventStripe> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public EventCluster(TimelineEvent event, EventType type, DescriptionLoD lod) {
|
public EventCluster(TimelineEvent event, EventType type, DescriptionLoD lod) {
|
||||||
this(new Interval(event.getStartMillis(), event.getEndMillis()),
|
this.span = new Interval(event.getStartMillis(), event.getEndMillis());
|
||||||
type,
|
this.type = type;
|
||||||
singleton(event.getEventID()),
|
|
||||||
event.isHashHit() ? singleton(event.getEventID()) : emptySet(),
|
this.eventIDs = new HashSet<>();
|
||||||
event.isTagged() ? singleton(event.getEventID()) : emptySet(),
|
this.eventIDs.add(event.getEventID());
|
||||||
event.getDescription(lod),
|
this.hashHits = event.isHashHit() ? new HashSet<>(eventIDs) : emptySet();
|
||||||
lod);
|
this.tagged = event.isTagged() ? new HashSet<>(eventIDs) : emptySet();
|
||||||
|
this.lod = lod;
|
||||||
|
this.description = event.getDescription(lod);
|
||||||
|
this.parent = null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user