mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-13 00:16:16 +00:00
Updated 'createFileIngestModule()' to check object type.
This commit is contained in:
parent
14202a080a
commit
044932d8bc
@ -68,7 +68,17 @@ public class IngestModuleFactory extends IngestModuleFactoryAdapter {
|
||||
|
||||
@Override
|
||||
public FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings) {
|
||||
return new IngestModule((IngestSettings) settings);
|
||||
if (settings instanceof IngestSettings) {
|
||||
return new IngestModule((IngestSettings) settings);
|
||||
}
|
||||
/*
|
||||
* Compatibility check for older versions.
|
||||
*/
|
||||
if (settings instanceof NoIngestModuleIngestJobSettings) {
|
||||
return new IngestModule(new IngestSettings());
|
||||
}
|
||||
|
||||
throw new IllegalArgumentException("Expected settings argument to be an instance of IngestSettings");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user