diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageAction.java b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageAction.java index 77be8048d0..2bb2a58bd3 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageAction.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageAction.java @@ -40,9 +40,11 @@ import org.sleuthkit.autopsy.ingest.IngestManager; import org.sleuthkit.datamodel.Image; /** - * An action that adds a data source to the current case. This action needs to - * be enabled and disabled as cases are opened and closed. Use - * CallableSystemAction.get(AddImageAction.class).setEnabled() to do so. + * An action that adds a data source to the current case. + * + * RC: This action needs to be enabled and disabled as cases are opened and + * closed. Currently this is done using + * CallableSystemAction.get(AddImageAction.class).setEnabled(). */ public final class AddImageAction extends CallableSystemAction implements Presenter.Toolbar { @@ -57,8 +59,8 @@ public final class AddImageAction extends CallableSystemAction implements Presen * Constructs an action that adds a data source to the current case. */ public AddImageAction() { - putValue(Action.NAME, NbBundle.getMessage(AddImageAction.class, "CTL_AddImage")); cleanupSupport = new ChangeSupport(this); + putValue(Action.NAME, NbBundle.getMessage(AddImageAction.class, "CTL_AddImage")); toolbarButton = new JButton(); toolbarButton.addActionListener(AddImageAction.this::actionPerformed); setEnabled(false); @@ -101,6 +103,9 @@ public final class AddImageAction extends CallableSystemAction implements Presen * abstract CleanupTask class to call their cleanup methods (assuming * they have not done an override of stateChanged), after which the * CleanupTasks are unregistered. + * + * RC: This is a convoluted and error-prone way to implement clean up. + * Fortunately, it is confined to this package. */ cleanupSupport.fireChange(); } @@ -180,8 +185,13 @@ public final class AddImageAction extends CallableSystemAction implements Presen * cleanUp method is called. Implementations should not override * stateChanged, and should not re-enable themselves after cleanUp is * called. To stop cleanUp being called, call disable before the wizard is - * dismissed. Also, instances must be constructed using a reference to an - * AddImageAction object because this is a non-static inner class. + * dismissed. + * + * Instances must be constructed using a reference to an AddImageAction + * object because this is a non-static inner class. + * + * RC: This is a convoluted and error-prone way to implement clean up. + * Fortunately, it is confined to this package. */ abstract class CleanupTask implements ChangeListener { @@ -228,11 +238,6 @@ public final class AddImageAction extends CallableSystemAction implements Presen } - /** - * Is not used by Autopsy. - * - * @deprecated - */ @Deprecated public interface IndexImageTask { diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardAddingProgressPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardAddingProgressPanel.java index 1dfc5e7b77..f64f41091d 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardAddingProgressPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardAddingProgressPanel.java @@ -38,7 +38,7 @@ import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorProgress final class AddImageWizardAddingProgressPanel implements WizardDescriptor.FinishablePanel { private final ChangeSupport changeSupport; - private final DSPProgressMonitorImpl dspProgressMonitor; + private final DSPProgressMonitorImpl dspProgressMonitor = new DSPProgressMonitorImpl(); private AddImageWizardAddingProgressVisual component; private boolean dataSourceAdded = false; @@ -48,7 +48,6 @@ final class AddImageWizardAddingProgressPanel implements WizardDescriptor.Finish */ AddImageWizardAddingProgressPanel() { changeSupport = new ChangeSupport(this); - dspProgressMonitor = new DSPProgressMonitorImpl(); } /** diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardChooseDataSourcePanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardChooseDataSourcePanel.java index 2d895fd910..ba7d7fb7ba 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardChooseDataSourcePanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardChooseDataSourcePanel.java @@ -37,7 +37,7 @@ final class AddImageWizardChooseDataSourcePanel implements WizardDescriptor.Pane private AddImageWizardChooseDataSourceVisual component; private final ChangeSupport changeSupport; - private boolean nextButtonIsEnabled; + private boolean nextButtonIsEnabled = false; /** * Constructs an instance of the first panel of the add data source wizard. diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardIngestConfigPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardIngestConfigPanel.java index 625391a423..5d83ec3994 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardIngestConfigPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardIngestConfigPanel.java @@ -194,6 +194,8 @@ final class AddImageWizardIngestConfigPanel implements WizardDescriptor.Panel