From 87f2e7bfe7341fb954cdb52fabc7be9984d35e8c Mon Sep 17 00:00:00 2001 From: Richard Cordovano Date: Tue, 18 Oct 2016 16:53:34 -0400 Subject: [PATCH] Minor 'linting' of KWS Ingester.java --- .../src/org/sleuthkit/autopsy/keywordsearch/Ingester.java | 6 +++--- .../{TermComponentQuery.java => TermsComponentQuery.java} | 0 2 files changed, 3 insertions(+), 3 deletions(-) rename KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/{TermComponentQuery.java => TermsComponentQuery.java} (100%) diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Ingester.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Ingester.java index eeef997618..169e9cb0ec 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Ingester.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Ingester.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2015 Basis Technology Corp. + * Copyright 2011-2016 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -59,7 +59,7 @@ class Ingester { //for ingesting chunk as SolrInputDocument (non-content-streaming, by-pass tika) //TODO use a streaming way to add content to /update handler private static final int MAX_DOC_CHUNK_SIZE = 1024 * 1024; - private static final String docContentEncoding = "UTF-8"; //NON-NLS + private static final String ENCODING = "UTF-8"; //NON-NLS private Ingester() { } @@ -298,7 +298,7 @@ class Ingester { if (read != 0) { String s = ""; try { - s = new String(docChunkContentBuf, 0, read, docContentEncoding); + s = new String(docChunkContentBuf, 0, read, ENCODING); // Sanitize by replacing non-UTF-8 characters with caret '^' before adding to index char[] chars = null; for (int i = 0; i < s.length(); i++) { diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/TermComponentQuery.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/TermsComponentQuery.java similarity index 100% rename from KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/TermComponentQuery.java rename to KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/TermsComponentQuery.java