mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-19 11:07:43 +00:00
Bug fixes
This commit is contained in:
parent
9cc641deee
commit
17580c484d
@ -38,7 +38,6 @@ class ReportWizardFileOptionsPanel implements WizardDescriptor.FinishablePanel<W
|
|||||||
private final JButton finishButton;
|
private final JButton finishButton;
|
||||||
|
|
||||||
ReportWizardFileOptionsPanel(FileReportSettings fileReportSettings) {
|
ReportWizardFileOptionsPanel(FileReportSettings fileReportSettings) {
|
||||||
wiz.putProperty("fileReportSettings", fileReportSettings);
|
|
||||||
finishButton = new JButton(
|
finishButton = new JButton(
|
||||||
NbBundle.getMessage(this.getClass(), "ReportWizardFileOptionsPanel.finishButton.text"));
|
NbBundle.getMessage(this.getClass(), "ReportWizardFileOptionsPanel.finishButton.text"));
|
||||||
finishButton.setEnabled(false);
|
finishButton.setEnabled(false);
|
||||||
|
@ -76,7 +76,7 @@ final class ReportWizardIterator implements WizardDescriptor.Iterator<WizardDesc
|
|||||||
firstPanel = new ReportWizardPanel1(null);
|
firstPanel = new ReportWizardPanel1(null);
|
||||||
tableConfigPanel = new ReportWizardPanel2(useCaseSpecificData, null);
|
tableConfigPanel = new ReportWizardPanel2(useCaseSpecificData, null);
|
||||||
fileConfigPanel = new ReportWizardFileOptionsPanel(null);
|
fileConfigPanel = new ReportWizardFileOptionsPanel(null);
|
||||||
portableCaseConfigPanel = new ReportWizardPortableCaseOptionsPanel(null);
|
portableCaseConfigPanel = new ReportWizardPortableCaseOptionsPanel(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
allConfigPanels = new WizardDescriptor.Panel[]{firstPanel, tableConfigPanel, fileConfigPanel, portableCaseConfigPanel};
|
allConfigPanels = new WizardDescriptor.Panel[]{firstPanel, tableConfigPanel, fileConfigPanel, portableCaseConfigPanel};
|
||||||
|
@ -34,9 +34,8 @@ class ReportWizardPanel2 implements WizardDescriptor.Panel<WizardDescriptor> {
|
|||||||
private WizardDescriptor wiz;
|
private WizardDescriptor wiz;
|
||||||
private final boolean useCaseSpecificData;
|
private final boolean useCaseSpecificData;
|
||||||
|
|
||||||
ReportWizardPanel2(boolean useCaseSpecificData, TableReportSettings tableResportSettings) {
|
ReportWizardPanel2(boolean useCaseSpecificData, TableReportSettings tableReportSettings) {
|
||||||
this.useCaseSpecificData = useCaseSpecificData;
|
this.useCaseSpecificData = useCaseSpecificData;
|
||||||
wiz.putProperty("tableReportSettings", tableResportSettings);
|
|
||||||
finishButton = new JButton(NbBundle.getMessage(this.getClass(), "ReportWizardPanel2.finishButton.text"));
|
finishButton = new JButton(NbBundle.getMessage(this.getClass(), "ReportWizardPanel2.finishButton.text"));
|
||||||
nextButton = new JButton(NbBundle.getMessage(this.getClass(), "ReportWizardPanel2.nextButton.text"));
|
nextButton = new JButton(NbBundle.getMessage(this.getClass(), "ReportWizardPanel2.nextButton.text"));
|
||||||
nextButton.setEnabled(true);
|
nextButton.setEnabled(true);
|
||||||
|
@ -104,8 +104,8 @@ final class ReportingConfigLoader {
|
|||||||
throw new ReportConfigException("Unable to read module configurations map " + filePath, ex);
|
throw new ReportConfigException("Unable to read module configurations map " + filePath, ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (moduleConfigs == null) {
|
if (moduleConfigs == null || moduleConfigs.isEmpty()) {
|
||||||
throw new ReportConfigException("Failed to read module configurations map " + filePath);
|
return config;
|
||||||
}
|
}
|
||||||
|
|
||||||
// read each ReportModuleSettings object individually
|
// read each ReportModuleSettings object individually
|
||||||
@ -138,6 +138,10 @@ final class ReportingConfigLoader {
|
|||||||
*/
|
*/
|
||||||
static synchronized void saveConfig(ReportingConfig reportConfig) throws ReportConfigException {
|
static synchronized void saveConfig(ReportingConfig reportConfig) throws ReportConfigException {
|
||||||
|
|
||||||
|
if (reportConfig == null) {
|
||||||
|
throw new ReportConfigException("Reporting configuration is NULL");
|
||||||
|
}
|
||||||
|
|
||||||
// construct the configuration directory path
|
// construct the configuration directory path
|
||||||
Path pathToConfigDir = Paths.get(ReportingConfigLoader.REPORT_CONFIG_FOLDER_PATH, reportConfig.getName());
|
Path pathToConfigDir = Paths.get(ReportingConfigLoader.REPORT_CONFIG_FOLDER_PATH, reportConfig.getName());
|
||||||
|
|
||||||
@ -177,6 +181,9 @@ final class ReportingConfigLoader {
|
|||||||
party report module settings. If we were to serialize the entire ReportingConfig
|
party report module settings. If we were to serialize the entire ReportingConfig
|
||||||
object, then a single error while reading in a 3rd party report module
|
object, then a single error while reading in a 3rd party report module
|
||||||
would prevent us from reading the entire reporting configuration.*/
|
would prevent us from reading the entire reporting configuration.*/
|
||||||
|
if (reportConfig.getModuleConfigs() == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
for (ReportModuleConfig moduleConfig : reportConfig.getModuleConfigs().values()) {
|
for (ReportModuleConfig moduleConfig : reportConfig.getModuleConfigs().values()) {
|
||||||
ReportModuleSettings settings = moduleConfig.getModuleSettings();
|
ReportModuleSettings settings = moduleConfig.getModuleSettings();
|
||||||
filePath = pathToConfigDir.toString() + File.separator + moduleConfig.getModuleClassName() + REPORT_SETTINGS_FILE_EXTENSION;
|
filePath = pathToConfigDir.toString() + File.separator + moduleConfig.getModuleClassName() + REPORT_SETTINGS_FILE_EXTENSION;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user