Merge pull request #2782 from raman-bt/release-4.4.0

2536: Review ChildFactory uses for long-running tasks
This commit is contained in:
Richard Cordovano 2017-05-04 17:56:26 -04:00 committed by GitHub
commit b9c0f63f65
4 changed files with 9 additions and 11 deletions

View File

@ -382,8 +382,8 @@ public class HashsetHits implements AutopsyVisitableItem {
if (!artifactHits.containsKey(id)) { if (!artifactHits.containsKey(id)) {
BlackboardArtifact art = skCase.getBlackboardArtifact(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
} }

View File

@ -356,10 +356,9 @@ public class InterestingHits implements AutopsyVisitableItem {
try { try {
if (!artifactHits.containsKey(id)) { if (!artifactHits.containsKey(id)) {
BlackboardArtifact art = skCase.getBlackboardArtifact(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
} }

View File

@ -708,18 +708,17 @@ public class KeywordHits implements AutopsyVisitableItem {
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);
if (!nodesMap.containsKey(key)) { if (!nodesMap.containsKey(key)) {
nodesMap.put(key, createNode(key)); nodesMap.put(key, createNode(key));
list.add(key);
} }
list.add(key);
} }
} else { } else {
for (String instance : instances) { for (String instance : instances) {
RegExpInstanceKey key = new RegExpInstanceKey(instance); RegExpInstanceKey key = new RegExpInstanceKey(instance);
if (!nodesMap.containsKey(key)) { if (!nodesMap.containsKey(key)) {
nodesMap.put(key, createNode(key)); nodesMap.put(key, createNode(key));
list.add(key);
} }
list.add(key);
} }
} }
@ -904,8 +903,8 @@ public class KeywordHits implements AutopsyVisitableItem {
for (Long id : keywordResults.getArtifactIds(setName, keyword, instance) ) { for (Long id : keywordResults.getArtifactIds(setName, keyword, instance) ) {
if (!nodesMap.containsKey(id)) { if (!nodesMap.containsKey(id)) {
nodesMap.put(id, createBlackboardArtifactNode(id)); nodesMap.put(id, createBlackboardArtifactNode(id));
list.add(id);
} }
list.add(id);
} }
return true; return true;
} }

View File

@ -102,14 +102,14 @@ public class EventRootNode extends DisplayableItemNode {
for (Long eventId: eventIDs){ for (Long eventId: eventIDs){
if (!nodesMap.containsKey(eventId)) { if (!nodesMap.containsKey(eventId)) {
nodesMap.put(eventId, createNode(eventId)); nodesMap.put(eventId, createNode(eventId));
toPopulate.add(eventId);
} }
toPopulate.add(eventId);
} }
} else { } else {
if (!nodesMap.containsKey(-1L)) { if (!nodesMap.containsKey(-1L)) {
nodesMap.put(-1L, createNode(-1L)); nodesMap.put(-1L, createNode(-1L));
toPopulate.add(-1L);
} }
toPopulate.add(-1L);
} }
return true; return true;
} }