mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 18:17:43 +00:00
defensive code
This commit is contained in:
parent
42a077b3ac
commit
2d3dcc43e8
@ -374,7 +374,7 @@ final class CaseEventListener implements PropertyChangeListener {
|
|||||||
|
|
||||||
private void handleTagAdded(BlackBoardArtifactTagAddedEvent evt) {
|
private void handleTagAdded(BlackBoardArtifactTagAddedEvent evt) {
|
||||||
// ensure tag added event has a valid content id
|
// ensure tag added event has a valid content id
|
||||||
if (evt.getAddedTag() == null || evt.getAddedTag().getContent() == null) {
|
if (evt.getAddedTag() == null || evt.getAddedTag().getContent() == null || evt.getAddedTag().getArtifact() == null) {
|
||||||
LOGGER.log(Level.SEVERE,
|
LOGGER.log(Level.SEVERE,
|
||||||
String.format("ContentTagAddedEvent %s did not have valid content to provide a content id.", evt));
|
String.format("ContentTagAddedEvent %s did not have valid content to provide a content id.", evt));
|
||||||
return;
|
return;
|
||||||
@ -440,7 +440,6 @@ final class CaseEventListener implements PropertyChangeListener {
|
|||||||
private void setArtifactKnownStatus(BlackboardArtifact bbArtifact, TskData.FileKnown knownStatus) {
|
private void setArtifactKnownStatus(BlackboardArtifact bbArtifact, TskData.FileKnown knownStatus) {
|
||||||
List<CorrelationAttributeInstance> convertedArtifacts = CorrelationAttributeUtil.makeCorrAttrsForCorrelation(bbArtifact);
|
List<CorrelationAttributeInstance> convertedArtifacts = CorrelationAttributeUtil.makeCorrAttrsForCorrelation(bbArtifact);
|
||||||
for (CorrelationAttributeInstance eamArtifact : convertedArtifacts) {
|
for (CorrelationAttributeInstance eamArtifact : convertedArtifacts) {
|
||||||
eamArtifact.setComment("");
|
|
||||||
try {
|
try {
|
||||||
dbManager.setAttributeInstanceKnownStatus(eamArtifact, knownStatus);
|
dbManager.setAttributeInstanceKnownStatus(eamArtifact, knownStatus);
|
||||||
} catch (CentralRepoException ex) {
|
} catch (CentralRepoException ex) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user