Minor 'linting' of KWS Ingester.java

This commit is contained in:
Richard Cordovano 2016-10-18 16:53:34 -04:00
parent a5d71db1b3
commit 87f2e7bfe7
2 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
/* /*
* Autopsy Forensic Browser * Autopsy Forensic Browser
* *
* Copyright 2011-2015 Basis Technology Corp. * Copyright 2011-2016 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org * Contact: carrier <at> sleuthkit <dot> org
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * 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) //for ingesting chunk as SolrInputDocument (non-content-streaming, by-pass tika)
//TODO use a streaming way to add content to /update handler //TODO use a streaming way to add content to /update handler
private static final int MAX_DOC_CHUNK_SIZE = 1024 * 1024; 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() { private Ingester() {
} }
@ -298,7 +298,7 @@ class Ingester {
if (read != 0) { if (read != 0) {
String s = ""; String s = "";
try { 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 // Sanitize by replacing non-UTF-8 characters with caret '^' before adding to index
char[] chars = null; char[] chars = null;
for (int i = 0; i < s.length(); i++) { for (int i = 0; i < s.length(); i++) {