Skip to content
Snippets Groups Projects
Commit a7541632 authored by esaunders's avatar esaunders
Browse files

Trim full description so that we remain within the limits of the PostgreSQL...

Trim full description so that we remain within the limits of the PostgreSQL index in tsk_event_descriptions
parent 2879a039
No related branches found
No related tags found
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.
Finish editing this message first!
Please register or to comment