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