mirror of
https://github.com/elisspace/autopsy.git
synced 2026-09-06 02:24:30 +00:00
FileTypeID module: thread-safety tweak and comments
This commit is contained in:
@@ -29,6 +29,9 @@ import org.sleuthkit.datamodel.AbstractFile;
|
||||
*/
|
||||
interface FileTypeDetectionInterface {
|
||||
|
||||
/**
|
||||
* Instances of this data structure are not shared between threads
|
||||
*/
|
||||
public class FileIdInfo {
|
||||
|
||||
public String type;
|
||||
|
||||
@@ -25,7 +25,7 @@ import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettings;
|
||||
*/
|
||||
public class FileTypeIdModuleSettings implements IngestModuleIngestJobSettings {
|
||||
|
||||
private boolean skipKnownFiles = true;
|
||||
private volatile boolean skipKnownFiles = true;
|
||||
|
||||
FileTypeIdModuleSettings() {
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ import org.sleuthkit.datamodel.AbstractFile;
|
||||
|
||||
class TikaFileTypeDetector implements FileTypeDetectionInterface {
|
||||
|
||||
private static Tika tikaInst = new Tika();
|
||||
private static Tika tikaInst = new Tika(); //calling detect() with this should be thread-safe
|
||||
|
||||
@Override
|
||||
public FileTypeDetectionInterface.FileIdInfo attemptMatch(AbstractFile abstractFile) {
|
||||
|
||||
Reference in New Issue
Block a user