1
0
mirror of https://github.com/elisspace/autopsy.git synced 2026-09-06 02:24:30 +00:00

Merge pull request #3491 from wschaeferB/3565-fixBugWithNullHash

3565 Fix bug with null MD5 and Interesting file and tag nodes
This commit is contained in:
Richard Cordovano
2018-03-05 17:51:09 -05:00
committed by GitHub
2 changed files with 4 additions and 2 deletions

View File

@@ -35,6 +35,7 @@ import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
import java.util.stream.Collectors;
import javax.swing.Action;
import org.apache.commons.lang3.StringUtils;
import org.openide.nodes.Sheet;
import org.openide.util.Lookup;
import org.openide.util.NbBundle;
@@ -421,7 +422,7 @@ public class BlackboardArtifactNode extends AbstractContentNode<BlackboardArtifa
ss.put(new NodeProperty<>(Bundle.BlackboardArtifactNode_createSheet_artifactMD5_name(),
Bundle.BlackboardArtifactNode_createSheet_artifactMD5_displayName(),
"",
file != null ? file.getMd5Hash() : ""));
file != null ? StringUtils.defaultString(file.getMd5Hash()) : ""));
}
} else {
String dataSourceStr = "";

View File

@@ -23,6 +23,7 @@ import java.util.Arrays;
import java.util.List;
import java.util.logging.Level;
import javax.swing.Action;
import org.apache.commons.lang3.StringUtils;
import org.openide.nodes.Children;
import org.openide.nodes.Sheet;
import org.openide.util.NbBundle;
@@ -114,7 +115,7 @@ class ContentTagNode extends DisplayableItemNode {
properties.put(new NodeProperty<>(Bundle.ContentTagNode_createSheet_artifactMD5_name(),
Bundle.ContentTagNode_createSheet_artifactMD5_displayName(),
"",
file != null ? file.getMd5Hash() : ""));
file != null ? StringUtils.defaultString(file.getMd5Hash()) : ""));
return propertySheet;
}