From 34d1efd73ac7bc22b0e54d78ac00e9352fd98c67 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Wed, 13 Jan 2021 14:44:36 -0500 Subject: [PATCH] bug fix --- .../modules/leappanalyzers/LeappFileProcessor.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/modules/leappanalyzers/LeappFileProcessor.java b/Core/src/org/sleuthkit/autopsy/modules/leappanalyzers/LeappFileProcessor.java index 2735eb5cee..3811f21a90 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/leappanalyzers/LeappFileProcessor.java +++ b/Core/src/org/sleuthkit/autopsy/modules/leappanalyzers/LeappFileProcessor.java @@ -577,10 +577,12 @@ public final class LeappFileProcessor { String required = nnm.getNamedItem("required").getNodeValue(); String parentName = attributeNlist.item(k).getParentNode().getParentNode().getAttributes().getNamedItem("filename").getNodeValue(); - BlackboardAttribute.ATTRIBUTE_TYPE foundAttrType = Stream.of(BlackboardAttribute.ATTRIBUTE_TYPE.values()) - .filter((attr_type) -> attr_type.name().compareToIgnoreCase(attributeName) == 0) - .findFirst() - .orElse(null); + BlackboardAttribute.Type foundAttrType = null; + try { + foundAttrType = Case.getCurrentCase().getSleuthkitCase().getAttributeType(attributeName.toUpperCase()); + } 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) { logger.log(Level.SEVERE, String.format("No known attribute mapping found for [%s]", getXmlAttrIdentifier(parentName, attributeName)));