From 8c3aa3ca3a1d25d60041ab6aef4ab44689559d78 Mon Sep 17 00:00:00 2001 From: sidheshenator Date: Thu, 19 Feb 2015 10:54:25 -0500 Subject: [PATCH] null check and empty string check added --- .../autopsy/modules/stix/STIXReportModule.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Core/src/org/sleuthkit/autopsy/modules/stix/STIXReportModule.java b/Core/src/org/sleuthkit/autopsy/modules/stix/STIXReportModule.java index 9215ca87b5..3b544cb0d7 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/stix/STIXReportModule.java +++ b/Core/src/org/sleuthkit/autopsy/modules/stix/STIXReportModule.java @@ -128,6 +128,20 @@ public class STIXReportModule implements GeneralReportModule { // Process the file/directory name entry 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); if (!stixFile.exists()) {