mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 10:17:41 +00:00
Error-proof HashLookupSettingsPanel.isLocalIngestJobEvent()
This commit is contained in:
parent
3cdfbf6934
commit
de360793f9
@ -229,7 +229,16 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan
|
||||
}
|
||||
|
||||
private boolean isLocalIngestJobEvent(PropertyChangeEvent evt) {
|
||||
return evt instanceof AutopsyEvent && ((AutopsyEvent)evt).getSourceType() == AutopsyEvent.SourceType.LOCAL;
|
||||
if (evt instanceof AutopsyEvent) {
|
||||
AutopsyEvent event = (AutopsyEvent) evt;
|
||||
if (event.getSourceType() == AutopsyEvent.SourceType.LOCAL) {
|
||||
String eventType = event.getPropertyName();
|
||||
return (eventType.equals(IngestManager.IngestJobEvent.STARTED.toString())
|
||||
|| eventType.equals(IngestManager.IngestJobEvent.CANCELLED.toString())
|
||||
|| eventType.equals(IngestManager.IngestJobEvent.COMPLETED.toString()));
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -305,7 +314,7 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan
|
||||
}
|
||||
int res = JOptionPane.showConfirmDialog(this, message,
|
||||
NbBundle.getMessage(this.getClass(),
|
||||
"HashDbConfigPanel.unindexedDbsMsg"),
|
||||
"HashDbConfigPanel.unindexedDbsMsg"),
|
||||
JOptionPane.YES_NO_OPTION);
|
||||
if (res == JOptionPane.YES_OPTION) {
|
||||
ModalNoButtons indexingDialog = new ModalNoButtons(this, new Frame(), unindexed);
|
||||
@ -753,7 +762,7 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan
|
||||
private void deleteDatabaseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteDatabaseButtonActionPerformed
|
||||
if (JOptionPane.showConfirmDialog(null,
|
||||
NbBundle.getMessage(this.getClass(),
|
||||
"HashDbConfigPanel.deleteDbActionConfirmMsg"),
|
||||
"HashDbConfigPanel.deleteDbActionConfirmMsg"),
|
||||
NbBundle.getMessage(this.getClass(), "HashDbConfigPanel.deleteDbActionMsg"),
|
||||
JOptionPane.YES_NO_OPTION,
|
||||
JOptionPane.WARNING_MESSAGE) == JOptionPane.YES_OPTION) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user