mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 18:17:43 +00:00
Merge pull request #2766 from raman-bt/release-4.4.0
2536: Review ChildFactory uses for long-running tasks
This commit is contained in:
commit
a3e4f1b440
@ -379,10 +379,11 @@ public class HashsetHits implements AutopsyVisitableItem {
|
|||||||
|
|
||||||
hashsetResults.getArtifactIds(hashsetName).forEach((id) -> {
|
hashsetResults.getArtifactIds(hashsetName).forEach((id) -> {
|
||||||
try {
|
try {
|
||||||
BlackboardArtifact art = skCase.getBlackboardArtifact(id);
|
if (!artifactHits.containsKey(id)) {
|
||||||
|
BlackboardArtifact art = skCase.getBlackboardArtifact(id);
|
||||||
artifactHits.put(id, art);
|
artifactHits.put(id, art);
|
||||||
list.add(id);
|
list.add(id);
|
||||||
|
}
|
||||||
} catch (TskException ex) {
|
} catch (TskException ex) {
|
||||||
logger.log(Level.SEVERE, "TSK Exception occurred", ex); //NON-NLS
|
logger.log(Level.SEVERE, "TSK Exception occurred", ex); //NON-NLS
|
||||||
}
|
}
|
||||||
|
@ -354,10 +354,12 @@ public class InterestingHits implements AutopsyVisitableItem {
|
|||||||
|
|
||||||
interestingResults.getArtifactIds(setName).forEach((id) -> {
|
interestingResults.getArtifactIds(setName).forEach((id) -> {
|
||||||
try {
|
try {
|
||||||
BlackboardArtifact art = skCase.getBlackboardArtifact(id);
|
if (!artifactHits.containsKey(id)) {
|
||||||
|
BlackboardArtifact art = skCase.getBlackboardArtifact(id);
|
||||||
|
|
||||||
artifactHits.put(id, art);
|
artifactHits.put(id, art);
|
||||||
list.add(id);
|
list.add(id);
|
||||||
|
}
|
||||||
} catch (TskCoreException ex) {
|
} catch (TskCoreException ex) {
|
||||||
logger.log(Level.SEVERE, "TSK Exception occurred", ex); //NON-NLS
|
logger.log(Level.SEVERE, "TSK Exception occurred", ex); //NON-NLS
|
||||||
}
|
}
|
||||||
|
@ -707,15 +707,19 @@ public class KeywordHits implements AutopsyVisitableItem {
|
|||||||
if ((instances.size() == 1) && (instances.get(0).equals(DEFAULT_INSTANCE_NAME))) {
|
if ((instances.size() == 1) && (instances.get(0).equals(DEFAULT_INSTANCE_NAME))) {
|
||||||
for (Long id : keywordResults.getArtifactIds(setName, keyword, DEFAULT_INSTANCE_NAME) ) {
|
for (Long id : keywordResults.getArtifactIds(setName, keyword, DEFAULT_INSTANCE_NAME) ) {
|
||||||
RegExpInstanceKey key = new RegExpInstanceKey(id);
|
RegExpInstanceKey key = new RegExpInstanceKey(id);
|
||||||
nodesMap.put(key, createNode(key));
|
if (!nodesMap.containsKey(key)) {
|
||||||
list.add(key);
|
nodesMap.put(key, createNode(key));
|
||||||
|
list.add(key);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (String instance : instances) {
|
for (String instance : instances) {
|
||||||
RegExpInstanceKey key = new RegExpInstanceKey(instance);
|
RegExpInstanceKey key = new RegExpInstanceKey(instance);
|
||||||
nodesMap.put(key, createNode(key));
|
if (!nodesMap.containsKey(key)) {
|
||||||
list.add(key);
|
nodesMap.put(key, createNode(key));
|
||||||
|
list.add(key);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -898,9 +902,11 @@ public class KeywordHits implements AutopsyVisitableItem {
|
|||||||
@Override
|
@Override
|
||||||
protected boolean createKeys(List<Long> list) {
|
protected boolean createKeys(List<Long> list) {
|
||||||
for (Long id : keywordResults.getArtifactIds(setName, keyword, instance) ) {
|
for (Long id : keywordResults.getArtifactIds(setName, keyword, instance) ) {
|
||||||
|
if (!nodesMap.containsKey(id)) {
|
||||||
nodesMap.put(id, createBlackboardArtifactNode(id));
|
nodesMap.put(id, createBlackboardArtifactNode(id));
|
||||||
list.add(id);
|
list.add(id);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,12 +100,16 @@ public class EventRootNode extends DisplayableItemNode {
|
|||||||
*/
|
*/
|
||||||
if (eventIDs.size() < MAX_EVENTS_TO_DISPLAY) {
|
if (eventIDs.size() < MAX_EVENTS_TO_DISPLAY) {
|
||||||
for (Long eventId: eventIDs){
|
for (Long eventId: eventIDs){
|
||||||
nodesMap.put(eventId, createNode(eventId));
|
if (!nodesMap.containsKey(eventId)) {
|
||||||
toPopulate.add(eventId);
|
nodesMap.put(eventId, createNode(eventId));
|
||||||
|
toPopulate.add(eventId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
nodesMap.put(-1L, createNode(-1L));
|
if (!nodesMap.containsKey(-1L)) {
|
||||||
toPopulate.add(-1L);
|
nodesMap.put(-1L, createNode(-1L));
|
||||||
|
toPopulate.add(-1L);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user