diff --git a/bindings/java/src/org/sleuthkit/datamodel/SleuthkitCase.java b/bindings/java/src/org/sleuthkit/datamodel/SleuthkitCase.java index f451f13f2abc6bfd8bcc6382c322067b2c6d4128..af6b27138948185d9e2d8b620aee5751663f6815 100755 --- a/bindings/java/src/org/sleuthkit/datamodel/SleuthkitCase.java +++ b/bindings/java/src/org/sleuthkit/datamodel/SleuthkitCase.java @@ -2888,10 +2888,22 @@ public ArrayList<BlackboardAttribute> getBlackboardAttributes(final BlackboardAr + " AND attrs.attribute_type_id = types.attribute_type_id"); ArrayList<BlackboardAttribute> attributes = new ArrayList<BlackboardAttribute>(); while (rs.next()) { + int attributeTypeId = rs.getInt("attribute_type_id"); + String attributeTypeName = rs.getString("type_name"); + BlackboardAttribute.Type attributeType; + if (this.typeIdToAttributeTypeMap.containsKey(attributeTypeId)) { + attributeType = this.typeIdToAttributeTypeMap.get(attributeTypeId); + } else { + attributeType = new BlackboardAttribute.Type(attributeTypeId, attributeTypeName, + rs.getString("display_name"), + BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.fromType(rs.getInt("value_type"))); + this.typeIdToAttributeTypeMap.put(attributeTypeId, attributeType); + this.typeNameToAttributeTypeMap.put(attributeTypeName, attributeType); + } + final BlackboardAttribute attr = new BlackboardAttribute( rs.getLong("artifact_id"), - new BlackboardAttribute.Type(rs.getInt("attribute_type_id"), rs.getString("type_name"), - rs.getString("display_name"), BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.fromType(rs.getInt("value_type"))), + attributeType, rs.getString("source"), rs.getString("context"), rs.getInt("value_int32"),