mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-14 17:06:16 +00:00
Minor 'linting' of KWS Ingester.java
This commit is contained in:
parent
a5d71db1b3
commit
87f2e7bfe7
@ -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++) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user