Skip to content
Snippets Groups Projects
Unverified Commit 3d56eeeb authored by Richard Cordovano's avatar Richard Cordovano Committed by GitHub
Browse files

Merge pull request #1962 from sleuthkit/6487-trim-full-description

6487 Trim full description so that we remain within the limits of the Post…
parents 273f9220 a7541632
Branches
Tags
No related merge requests found
......@@ -43,9 +43,9 @@ class TimelineEventArtifactTypeImpl extends TimelineEventTypeImpl {
private final TSKCoreCheckedFunction<BlackboardArtifact, String> shortExtractor;
private final TSKCoreCheckedFunction<BlackboardArtifact, TimelineEventDescriptionWithTime> artifactParsingFunction;
private static final int MAX_SHORT_DESCRIPTION_LENGTH = 500;
private static final int MAX_MED_DESCRIPTION_LENGTH = 500;
private static final int MAX_FULL_DESCRIPTION_LENGTH = 1024;
protected static final int MAX_SHORT_DESCRIPTION_LENGTH = 500;
protected static final int MAX_MED_DESCRIPTION_LENGTH = 500;
protected static final int MAX_FULL_DESCRIPTION_LENGTH = 1024;
TimelineEventArtifactTypeImpl(int typeID, String displayName,
TimelineEventType superType,
......
......@@ -33,6 +33,9 @@ class TimelineEventArtifactTypeSingleDescription extends TimelineEventArtifactTy
@Override
public TimelineEventDescriptionWithTime makeEventDescription(BlackboardArtifact artifact) throws TskCoreException {
String description = extractFullDescription(artifact);
if (description.length() > MAX_FULL_DESCRIPTION_LENGTH) {
description = description.substring(0, MAX_FULL_DESCRIPTION_LENGTH);
}
BlackboardAttribute timeAttribute = artifact.getAttribute(getDateTimeAttributeType());
if (timeAttribute == null) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment