Bugfixes.

This commit is contained in:
Oliver Spohngellert 2016-04-12 13:02:09 -04:00
parent 125443e469
commit 7da864fdcd
3 changed files with 12 additions and 22 deletions

View File

@ -33,7 +33,6 @@ import org.sleuthkit.autopsy.coreutils.ModuleSettings;
import org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.HashDb;
import org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.HashDb.KnownFilesType;
import org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.HashDbManagerException;
import org.sleuthkit.datamodel.TskCoreException;
/**
* Instances of this class allow a user to create a new hash database and add it
@ -349,15 +348,6 @@ final class HashDbCreateDatabaseDialog extends javax.swing.JDialog {
"HashDbCreateDatabaseDialog.createHashDbErr"),
JOptionPane.ERROR_MESSAGE);
return;
} catch (TskCoreException ex) {
Logger.getLogger(HashDbCreateDatabaseDialog.class.getName()).log(Level.SEVERE, errorMessage, ex);
JOptionPane.showMessageDialog(this,
NbBundle.getMessage(this.getClass(),
"HashDbCreateDatabaseDialog.failedToCreateHashDbMsg"),
NbBundle.getMessage(this.getClass(),
"HashDbCreateDatabaseDialog.createHashDbErr"),
JOptionPane.ERROR_MESSAGE);
return;
}
dispose();

View File

@ -30,7 +30,6 @@ import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.filechooser.FileNameExtensionFilter;
import javax.swing.JFrame;
import org.sleuthkit.datamodel.TskCoreException;
import org.apache.commons.io.FilenameUtils;
import org.sleuthkit.autopsy.coreutils.ModuleSettings;
import org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.HashDb.KnownFilesType;
@ -333,7 +332,7 @@ final class HashDbImportDatabaseDialog extends javax.swing.JDialog {
"HashDbImportDatabaseDialog.errorMessage.failedToOpenHashDbMsg",
selectedFilePath);
try {
selectedHashDb = HashDbManager.getInstance().addExistingHashDatabaseInternal(hashSetNameTextField.getText(), selectedFilePath, true, sendIngestMessagesCheckbox.isSelected(), type);
selectedHashDb = HashDbManager.getInstance().addExistingHashDatabase(hashSetNameTextField.getText(), selectedFilePath, true, sendIngestMessagesCheckbox.isSelected(), type);
} catch (HashDbManagerException ex) {
Logger.getLogger(HashDbImportDatabaseDialog.class.getName()).log(Level.WARNING, errorMessage, ex);
JOptionPane.showMessageDialog(this,
@ -342,14 +341,6 @@ final class HashDbImportDatabaseDialog extends javax.swing.JDialog {
"HashDbImportDatabaseDialog.importHashDbErr"),
JOptionPane.ERROR_MESSAGE);
return;
} catch (TskCoreException ex) {
Logger.getLogger(HashDbCreateDatabaseDialog.class.getName()).log(Level.SEVERE, errorMessage, ex);
JOptionPane.showMessageDialog(this,
errorMessage,
NbBundle.getMessage(this.getClass(),
"HashDbImportDatabaseDialog.importHashDbErr"),
JOptionPane.ERROR_MESSAGE);
return;
}
dispose();

View File

@ -810,6 +810,7 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan
indexDialog.setModal(true);
}//GEN-LAST:event_indexButtonActionPerformed
@Messages({})
private void deleteDatabaseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteDatabaseButtonActionPerformed
if (JOptionPane.showConfirmDialog(null,
NbBundle.getMessage(this.getClass(),
@ -819,7 +820,11 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan
JOptionPane.WARNING_MESSAGE) == JOptionPane.YES_OPTION) {
HashDb hashDb = ((HashSetTable) hashSetTable).getSelection();
if (hashDb != null) {
hashSetManager.removeHashDatabaseInternal(hashDb);
try {
hashSetManager.removeHashDatabase(hashDb);
} catch (HashDbManager.HashDbManagerException ex) {
JOptionPane.showMessageDialog(null, Bundle.HashLookupSettingsPanel_removeDatabaseFailure_message(hashDb.getHashSetName()));
}
hashSetTableModel.refreshModel();
}
}
@ -829,7 +834,11 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan
if (evt.getKeyCode() == KeyEvent.VK_DELETE) {
HashDb hashDb = ((HashSetTable) hashSetTable).getSelection();
if (hashDb != null) {
hashSetManager.removeHashDatabaseInternal(hashDb);
try {
hashSetManager.removeHashDatabase(hashDb);
} catch (HashDbManager.HashDbManagerException ex) {
JOptionPane.showMessageDialog(null, Bundle.HashLookupSettingsPanel_removeDatabaseFailure_message(hashDb.getHashSetName()));
}
hashSetTableModel.refreshModel();
}
}