mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-13 16:36:15 +00:00
Updated 'createFileIngestModule()' to check object type.
This commit is contained in:
parent
14202a080a
commit
044932d8bc
@ -68,8 +68,18 @@ public class IngestModuleFactory extends IngestModuleFactoryAdapter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings) {
|
public FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings) {
|
||||||
|
if (settings instanceof IngestSettings) {
|
||||||
return new IngestModule((IngestSettings) settings);
|
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
|
@Override
|
||||||
public boolean hasGlobalSettingsPanel() {
|
public boolean hasGlobalSettingsPanel() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user