mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Merge pull request #7317 from wschaeferB/8066-NpeFromScoTask
8066 prevent null task being submitted to background thread
This commit is contained in:
commit
278e43745d
@ -891,23 +891,13 @@ public class BlackboardArtifactNode extends AbstractContentNode<BlackboardArtifa
|
||||
NO_DESCR,
|
||||
getDisplayName()));
|
||||
|
||||
GetSCOTask scoTask = null;
|
||||
GetSCOTask scoTask;
|
||||
if (artifact instanceof AnalysisResult
|
||||
&& !(artifactType.getTypeID() == BlackboardArtifact.ARTIFACT_TYPE.TSK_HASHSET_HIT.getTypeID()
|
||||
|| artifactType.getTypeID() == BlackboardArtifact.ARTIFACT_TYPE.TSK_KEYWORD_HIT.getTypeID())) {
|
||||
scoTask = updateSheetForAnalysisResult((AnalysisResult) artifact, sheetSet);
|
||||
} else {
|
||||
/*
|
||||
* Add the name of the source content of the artifact represented by
|
||||
* this node to the sheet. The value of this property is the same as
|
||||
* the display name of the node and this a "special" property that
|
||||
* displays the node's icon as well as the display name.
|
||||
*/
|
||||
sheetSet.put(new NodeProperty<>(
|
||||
Bundle.BlackboardArtifactNode_createSheet_srcFile_name(),
|
||||
Bundle.BlackboardArtifactNode_createSheet_srcFile_displayName(),
|
||||
NO_DESCR,
|
||||
getDisplayName()));
|
||||
scoTask = addSCOColumns(sheetSet);
|
||||
}
|
||||
|
||||
if (TextTranslationService.getInstance().hasProvider() && UserPreferences.displayTranslatedFileNames()) {
|
||||
@ -929,10 +919,6 @@ public class BlackboardArtifactNode extends AbstractContentNode<BlackboardArtifa
|
||||
}
|
||||
}
|
||||
|
||||
if (scoTask == null) {
|
||||
scoTask = addSCOColumns(sheetSet);
|
||||
}
|
||||
|
||||
/*
|
||||
* If the artifact represented by this node is an interesting artifact
|
||||
* hit, add the type and description of the interesting artifact to the
|
||||
@ -1148,8 +1134,10 @@ public class BlackboardArtifactNode extends AbstractContentNode<BlackboardArtifa
|
||||
NO_DESCR,
|
||||
path));
|
||||
}
|
||||
|
||||
backgroundTasksPool.submit(scoTask);
|
||||
|
||||
if (scoTask != null) {
|
||||
backgroundTasksPool.submit(scoTask);
|
||||
}
|
||||
|
||||
return sheet;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user