null check and empty string check added

This commit is contained in:
sidheshenator 2015-02-19 10:54:25 -05:00
parent 5ad65489f0
commit 8c3aa3ca3a

View File

@ -128,6 +128,20 @@ public class STIXReportModule implements GeneralReportModule {
// Process the file/directory name entry // Process the file/directory name entry
String stixFileName = configPanel.getStixFile(); String stixFileName = configPanel.getStixFile();
if (stixFileName == null) {
logger.log(Level.SEVERE, "STIXReportModuleConfigPanel.stixFile not initialized ");
MessageNotifyUtil.Message.error("No STIX file/directory provided ");
progressPanel.complete();
progressPanel.updateStatusLabel("No STIX file/directory provided ");
return;
}
if (stixFileName.isEmpty()) {
logger.log(Level.SEVERE, "No STIX file/directory provided ");
MessageNotifyUtil.Message.error("No STIX file/directory provided ");
progressPanel.complete();
progressPanel.updateStatusLabel("No STIX file/directory provided ");
return;
}
File stixFile = new File(stixFileName); File stixFile = new File(stixFileName);
if (!stixFile.exists()) { if (!stixFile.exists()) {