mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 07:56:16 +00:00
Handle errors better, prevent null ptr exc in Extract
This commit is contained in:
parent
4df34868ba
commit
aef802f134
@ -36,7 +36,7 @@ abstract public class Extract implements IngestModuleImage{
|
||||
protected Case currentCase = Case.getCurrentCase(); // get the most updated case
|
||||
protected SleuthkitCase tskCase = currentCase.getSleuthkitCase();
|
||||
public final Logger logger = Logger.getLogger(this.getClass().getName());
|
||||
protected ArrayList<String> errorMessages = null;
|
||||
protected final ArrayList<String> errorMessages = new ArrayList<String>();
|
||||
protected String moduleName = "";
|
||||
|
||||
//hide public constructor to prevent from instantiation by ingest module loader
|
||||
@ -45,9 +45,6 @@ abstract public class Extract implements IngestModuleImage{
|
||||
}
|
||||
|
||||
List<String> getErrorMessages() {
|
||||
if(errorMessages == null) {
|
||||
errorMessages = new ArrayList<String>();
|
||||
}
|
||||
return errorMessages;
|
||||
}
|
||||
|
||||
|
@ -163,6 +163,9 @@ public class SearchEngineURLQueryAnalyzer extends Extract implements IngestModul
|
||||
*/
|
||||
|
||||
private static SearchEngine getSearchEngine(String domain){
|
||||
if (engines == null) {
|
||||
return SearchEngineURLQueryAnalyzer.NullEngine;
|
||||
}
|
||||
for(int i = 0; i < engines.length; i++){
|
||||
if(domain.contains(engines[i].getDomainSubstring())){
|
||||
return engines[i];
|
||||
|
Loading…
x
Reference in New Issue
Block a user