This commit is contained in:
Greg DiCristofaro 2021-01-13 14:44:36 -05:00
parent ed9552dab5
commit 34d1efd73a

View File

@ -577,10 +577,12 @@ public final class LeappFileProcessor {
String required = nnm.getNamedItem("required").getNodeValue(); String required = nnm.getNamedItem("required").getNodeValue();
String parentName = attributeNlist.item(k).getParentNode().getParentNode().getAttributes().getNamedItem("filename").getNodeValue(); String parentName = attributeNlist.item(k).getParentNode().getParentNode().getAttributes().getNamedItem("filename").getNodeValue();
BlackboardAttribute.ATTRIBUTE_TYPE foundAttrType = Stream.of(BlackboardAttribute.ATTRIBUTE_TYPE.values()) BlackboardAttribute.Type foundAttrType = null;
.filter((attr_type) -> attr_type.name().compareToIgnoreCase(attributeName) == 0) try {
.findFirst() foundAttrType = Case.getCurrentCase().getSleuthkitCase().getAttributeType(attributeName.toUpperCase());
.orElse(null); } catch (TskCoreException ex) {
logger.log(Level.SEVERE, String.format("There was an issue that arose while trying to fetch attribute type for %s.", attributeName), ex);
}
if (foundAttrType == null) { if (foundAttrType == null) {
logger.log(Level.SEVERE, String.format("No known attribute mapping found for [%s]", getXmlAttrIdentifier(parentName, attributeName))); logger.log(Level.SEVERE, String.format("No known attribute mapping found for [%s]", getXmlAttrIdentifier(parentName, attributeName)));