diff --git a/Core/manifest.mf b/Core/manifest.mf
index 67d3366e22..5eb077ef30 100644
--- a/Core/manifest.mf
+++ b/Core/manifest.mf
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
OpenIDE-Module: org.sleuthkit.autopsy.core/10
OpenIDE-Module-Localizing-Bundle: org/sleuthkit/autopsy/core/Bundle.properties
OpenIDE-Module-Layer: org/sleuthkit/autopsy/core/layer.xml
-OpenIDE-Module-Implementation-Version: 23
+OpenIDE-Module-Implementation-Version: 24
OpenIDE-Module-Requires: org.openide.windows.WindowManager
AutoUpdate-Show-In-Client: true
AutoUpdate-Essential-Module: true
diff --git a/Core/nbproject/project.properties b/Core/nbproject/project.properties
index b596512161..80bb473653 100644
--- a/Core/nbproject/project.properties
+++ b/Core/nbproject/project.properties
@@ -17,7 +17,6 @@ file.reference.sevenzipjbinding-AllPlatforms.jar=release/modules/ext/sevenzipjbi
file.reference.sevenzipjbinding.jar=release/modules/ext/sevenzipjbinding.jar
file.reference.sqlite-jdbc-3.8.11.jar=release/modules/ext/sqlite-jdbc-3.8.11.jar
file.reference.StixLib.jar=release/modules/ext/StixLib.jar
-file.reference.sleuthkit-postgresql-4.6.1.jar=release/modules/ext/sleuthkit-postgresql-4.6.1.jar
file.reference.bcprov-jdk15on-1.54.jar=release/modules/ext/bcprov-jdk15on-1.54.jar
file.reference.jackcess-2.1.8.jar=release/modules/ext/jackcess-2.1.8.jar
file.reference.jackcess-encrypt-2.1.2.jar=release/modules/ext/jackcess-encrypt-2.1.2.jar
@@ -30,7 +29,7 @@ file.reference.cxf-rt-transports-http-3.0.16.jar=release/modules/ext/cxf-rt-tran
file.reference.fontbox-2.0.8.jar=release/modules/ext/fontbox-2.0.8.jar
file.reference.pdfbox-2.0.8.jar=release/modules/ext/pdfbox-2.0.8.jar
file.reference.pdfbox-tools-2.0.8.jar=release/modules/ext/pdfbox-tools-2.0.8.jar
-file.reference.sleuthkit-postgresql-4.6.1.jar=release/modules/ext/sleuthkit-postgresql-4.6.1.jar
+file.reference.sleuthkit-postgresql-4.6.2.jar=release/modules/ext/sleuthkit-postgresql-4.6.2.jar
file.reference.tika-core-1.17.jar=release/modules/ext/tika-core-1.17.jar
file.reference.tika-parsers-1.17.jar=release/modules/ext/tika-parsers-1.17.jar
file.reference.curator-client-2.8.0.jar=release/modules/ext/curator-client-2.8.0.jar
@@ -47,5 +46,5 @@ nbm.homepage=http://www.sleuthkit.org/
nbm.module.author=Brian Carrier
nbm.needs.restart=true
source.reference.curator-recipes-2.8.0.jar=release/modules/ext/curator-recipes-2.8.0-sources.jar
-spec.version.base=10.11
+spec.version.base=10.12
diff --git a/Core/nbproject/project.xml b/Core/nbproject/project.xml
index 57cbc58c25..859db9f0d2 100644
--- a/Core/nbproject/project.xml
+++ b/Core/nbproject/project.xml
@@ -251,7 +251,7 @@
3
- 1.1
+ 1.2
@@ -412,8 +412,8 @@
release/modules/ext/metadata-extractor-2.10.1.jar
- ext/sleuthkit-postgresql-4.6.1.jar
- release/modules/ext/sleuthkit-postgresql-4.6.1.jar
+ ext/sleuthkit-postgresql-4.6.2.jar
+ release/modules/ext/sleuthkit-postgresql-4.6.2.jar
ext/tika-core-1.17.jar
@@ -499,7 +499,7 @@
ext/xmpcore-5.1.3.jar
release/modules/ext/xmpcore-5.1.3.jar
-
+
ext/SparseBitSet-1.1.jar
release/modules/ext/SparseBitSet-1.1.jar
diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/AddEditCentralRepoCommentAction.java b/Core/src/org/sleuthkit/autopsy/centralrepository/AddEditCentralRepoCommentAction.java
index 654ee7161e..df98197428 100755
--- a/Core/src/org/sleuthkit/autopsy/centralrepository/AddEditCentralRepoCommentAction.java
+++ b/Core/src/org/sleuthkit/autopsy/centralrepository/AddEditCentralRepoCommentAction.java
@@ -21,51 +21,48 @@ package org.sleuthkit.autopsy.centralrepository;
import java.awt.event.ActionEvent;
import java.util.logging.Level;
import javax.swing.AbstractAction;
+import org.openide.DialogDisplayer;
+import org.openide.NotifyDescriptor;
+import org.openide.util.NbBundle;
import org.openide.util.NbBundle.Messages;
-import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttribute;
import org.sleuthkit.autopsy.centralrepository.datamodel.EamArtifactUtil;
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDb;
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbException;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.datamodel.AbstractFile;
-import org.sleuthkit.datamodel.TskCoreException;
/**
* An AbstractAction to manage adding and modifying a Central Repository file
* instance comment.
*/
+@Messages({"AddEditCentralRepoCommentAction.menuItemText.addEditCentralRepoComment=Add/Edit Central Repository Comment"})
public final class AddEditCentralRepoCommentAction extends AbstractAction {
private static final Logger logger = Logger.getLogger(AddEditCentralRepoCommentAction.class.getName());
private boolean addToDatabase;
private CorrelationAttribute correlationAttribute;
- String title;
+ private String comment;
/**
- * Private constructor to create an instance given a CorrelationAttribute.
+ * Constructor to create an instance given a CorrelationAttribute.
*
* @param correlationAttribute The correlation attribute to modify.
- * @param title The text for the menu item.
*/
- private AddEditCentralRepoCommentAction(CorrelationAttribute correlationAttribute, String title) {
- super(title);
- this.title = title;
+ public AddEditCentralRepoCommentAction(CorrelationAttribute correlationAttribute) {
+ super(Bundle.AddEditCentralRepoCommentAction_menuItemText_addEditCentralRepoComment());
this.correlationAttribute = correlationAttribute;
}
/**
- * Private constructor to create an instance given an AbstractFile.
+ * Constructor to create an instance given an AbstractFile.
*
- * @param file The file from which a correlation attribute to modify is
- * derived.
- * @param title The text for the menu item.
+ * @param file The file from which a correlation attribute to modify is
+ * derived.
*/
- private AddEditCentralRepoCommentAction(AbstractFile file, String title) {
-
- super(title);
- this.title = title;
+ public AddEditCentralRepoCommentAction(AbstractFile file) {
+ super(Bundle.AddEditCentralRepoCommentAction_menuItemText_addEditCentralRepoComment());
correlationAttribute = EamArtifactUtil.getCorrelationAttributeFromContent(file);
if (correlationAttribute == null) {
addToDatabase = true;
@@ -73,26 +70,24 @@ public final class AddEditCentralRepoCommentAction extends AbstractAction {
}
}
- @Override
- public void actionPerformed(ActionEvent event) {
- addEditCentralRepoComment();
- }
-
/**
* Create a Add/Edit dialog for the correlation attribute file instance
* comment. The comment will be updated in the database if the file instance
* exists there, or a new file instance will be added to the database with
* the comment attached otherwise.
- *
- * The current comment for this instance is returned in case it is needed to
- * update the display.
*
- * @return the current comment for this instance
+ * The current comment for this instance is saved in case it is needed to
+ * update the display. If the comment was not changed either due to the
+ * action being canceled or the occurrence of an error, the comment will be
+ * null.
*/
- public String addEditCentralRepoComment() {
- CentralRepoCommentDialog centralRepoCommentDialog = new CentralRepoCommentDialog(correlationAttribute, title);
+ @Override
+ public void actionPerformed(ActionEvent event) {
+ CentralRepoCommentDialog centralRepoCommentDialog = new CentralRepoCommentDialog(correlationAttribute);
centralRepoCommentDialog.display();
+ comment = null;
+
if (centralRepoCommentDialog.isCommentUpdated()) {
EamDb dbManager;
@@ -104,45 +99,35 @@ public final class AddEditCentralRepoCommentAction extends AbstractAction {
} else {
dbManager.updateAttributeInstanceComment(correlationAttribute);
}
+
+ comment = centralRepoCommentDialog.getComment();
} catch (EamDbException ex) {
logger.log(Level.SEVERE, "Error adding comment", ex);
+ NotifyDescriptor notifyDescriptor = new NotifyDescriptor.Message(
+ "An error occurred while trying to save the comment to the central repository.",
+ NotifyDescriptor.ERROR_MESSAGE);
+ DialogDisplayer.getDefault().notify(notifyDescriptor);
}
}
- return centralRepoCommentDialog.getComment();
}
/**
- * Create an instance labeled "Add/Edit Central Repository Comment" given an
- * AbstractFile. This is intended for the result view.
+ * Retrieve the comment that was last saved. If a comment update was
+ * canceled or an error occurred while attempting to save the comment, the
+ * comment will be null.
*
- * @param file The file from which a correlation attribute to modify is
- * derived.
- *
- * @return The instance.
- *
- * @throws EamDbException
- * @throws NoCurrentCaseException
- * @throws TskCoreException
+ * @return The comment.
*/
- @Messages({"AddEditCentralRepoCommentAction.menuItemText.addEditCentralRepoComment=Add/Edit Central Repository Comment"})
- public static AddEditCentralRepoCommentAction createAddEditCentralRepoCommentAction(AbstractFile file) {
-
- return new AddEditCentralRepoCommentAction(file,
- Bundle.AddEditCentralRepoCommentAction_menuItemText_addEditCentralRepoComment());
+ public String getComment() {
+ return comment;
}
-
+
/**
- * Create an instance labeled "Add/Edit Comment" given a
- * CorrelationAttribute. This is intended for the content view.
- *
- * @param correlationAttribute The correlation attribute to modify.
- *
- * @return The instance.
+ * Retrieve the associated correlation attribute.
+ *
+ * @return The correlation attribute.
*/
- @Messages({"AddEditCentralRepoCommentAction.menuItemText.addEditComment=Add/Edit Comment"})
- public static AddEditCentralRepoCommentAction createAddEditCommentAction(CorrelationAttribute correlationAttribute) {
-
- return new AddEditCentralRepoCommentAction(correlationAttribute,
- Bundle.AddEditCentralRepoCommentAction_menuItemText_addEditComment());
+ public CorrelationAttribute getCorrelationAttribute() {
+ return correlationAttribute;
}
}
diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/CentralRepoCommentDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/CentralRepoCommentDialog.java
index c95b0bfde7..529ffb8529 100755
--- a/Core/src/org/sleuthkit/autopsy/centralrepository/CentralRepoCommentDialog.java
+++ b/Core/src/org/sleuthkit/autopsy/centralrepository/CentralRepoCommentDialog.java
@@ -18,6 +18,7 @@
*/
package org.sleuthkit.autopsy.centralrepository;
+import org.openide.util.NbBundle.Messages;
import org.openide.windows.WindowManager;
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttribute;
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeInstance;
@@ -26,6 +27,7 @@ import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeIns
* Dialog to allow Central Repository file instance comments to be added and
* modified.
*/
+@Messages({"CentralRepoCommentDialog.title.addEditCentralRepoComment=Add/Edit Central Repository Comment"})
@SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
final class CentralRepoCommentDialog extends javax.swing.JDialog {
@@ -37,10 +39,9 @@ final class CentralRepoCommentDialog extends javax.swing.JDialog {
* Create an instance.
*
* @param correlationAttribute The correlation attribute to be modified.
- * @param title The title to assign the dialog.
*/
- CentralRepoCommentDialog(CorrelationAttribute correlationAttribute, String title) {
- super(WindowManager.getDefault().getMainWindow(), title);
+ CentralRepoCommentDialog(CorrelationAttribute correlationAttribute) {
+ super(WindowManager.getDefault().getMainWindow(), Bundle.CentralRepoCommentDialog_title_addEditCentralRepoComment());
initComponents();
@@ -82,6 +83,7 @@ final class CentralRepoCommentDialog extends javax.swing.JDialog {
* Get the current comment.
* If the user hit OK, this will be the new comment.
* If the user canceled, this will be the original comment.
+ *
* @return the comment
*/
String getComment() {
diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/CentralRepoContextMenuActionsProvider.java b/Core/src/org/sleuthkit/autopsy/centralrepository/CentralRepoContextMenuActionsProvider.java
index 5a6e8fa652..65a980558c 100755
--- a/Core/src/org/sleuthkit/autopsy/centralrepository/CentralRepoContextMenuActionsProvider.java
+++ b/Core/src/org/sleuthkit/autopsy/centralrepository/CentralRepoContextMenuActionsProvider.java
@@ -38,19 +38,23 @@ public class CentralRepoContextMenuActionsProvider implements ContextMenuActions
@Override
public List getActions() {
- ArrayList actions = new ArrayList<>();
+ ArrayList actionsList = new ArrayList<>();
Collection extends AbstractFile> selectedFiles = Utilities.actionsGlobalContext().lookupAll(AbstractFile.class);
if (selectedFiles.size() != 1) {
- return actions;
+ return actionsList;
}
for (AbstractFile file : selectedFiles) {
if (EamDbUtil.useCentralRepo() && EamArtifactUtil.isSupportedAbstractFileType(file) && file.isFile()) {
- actions.add(AddEditCentralRepoCommentAction.createAddEditCentralRepoCommentAction(file));
+ AddEditCentralRepoCommentAction action = new AddEditCentralRepoCommentAction(file);
+ if (action.getCorrelationAttribute() == null) {
+ action.setEnabled(false);
+ }
+ actionsList.add(action);
}
}
- return actions;
+ return actionsList;
}
}
diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/Bundle.properties b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/Bundle.properties
index b3375cda0d..acb3fa42d1 100644
--- a/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/Bundle.properties
+++ b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/Bundle.properties
@@ -3,7 +3,7 @@ DataContentViewerOtherCases.showCaseDetailsMenuItem.text=Show Case Details
DataContentViewerOtherCases.table.toolTip.text=Click column name to sort. Right-click on the table for more options.
DataContentViewerOtherCases.exportToCSVMenuItem.text=Export Selected Rows to CSV
DataContentViewerOtherCases.showCommonalityMenuItem.text=Show Frequency
-DataContentViewerOtherCases.addCommentMenuItem.text=Add/Edit Comment
+DataContentViewerOtherCases.addCommentMenuItem.text=Add/Edit Central Repository Comment
DataContentViewerOtherCases.earliestCaseDate.text=Earliest Case Date
DataContentViewerOtherCases.earliestCaseLabel.toolTipText=
DataContentViewerOtherCases.earliestCaseLabel.text=Central Repository Starting Date:
diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java
index 8ead475d95..26ceed5500 100644
--- a/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java
+++ b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java
@@ -38,7 +38,6 @@ import java.util.Map;
import java.util.Objects;
import java.util.logging.Level;
import org.sleuthkit.autopsy.coreutils.Logger;
-import java.util.stream.Collectors;
import javax.swing.JFileChooser;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
@@ -127,12 +126,15 @@ public class DataContentViewerOtherCases extends JPanel implements DataContentVi
} else if (jmi.equals(addCommentMenuItem)) {
try {
OtherOccurrenceNodeData selectedNode = (OtherOccurrenceNodeData) tableModel.getRow(otherCasesTable.getSelectedRow());
- AddEditCentralRepoCommentAction action = AddEditCentralRepoCommentAction.createAddEditCommentAction(selectedNode.createCorrelationAttribute());
- String currentComment = action.addEditCentralRepoComment();
- selectedNode.updateComment(currentComment);
- otherCasesTable.repaint();
+ AddEditCentralRepoCommentAction action = new AddEditCentralRepoCommentAction(selectedNode.createCorrelationAttribute());
+ action.actionPerformed(null);
+ String currentComment = action.getComment();
+ if (currentComment != null) {
+ selectedNode.updateComment(action.getComment());
+ otherCasesTable.repaint();
+ }
} catch (EamDbException ex) {
- logger.log(Level.SEVERE, "Error performing Add/Edit Comment action", ex);
+ logger.log(Level.SEVERE, "Error performing Add/Edit Central Repository Comment action", ex);
}
}
}
diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamArtifactUtil.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamArtifactUtil.java
index 6aad75d38e..808b314af0 100644
--- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamArtifactUtil.java
+++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamArtifactUtil.java
@@ -235,21 +235,37 @@ public class EamArtifactUtil {
return null;
}
- CorrelationAttribute correlationAttribute = null;
-
+ CorrelationAttribute correlationAttribute;
+ CorrelationAttribute.Type type;
+ CorrelationCase correlationCase;
+ CorrelationDataSource correlationDataSource;
+ String value;
+ String filePath;
+
try {
- CorrelationAttribute.Type type = EamDb.getInstance().getCorrelationTypeById(CorrelationAttribute.FILES_TYPE_ID);
- CorrelationCase correlationCase = EamDb.getInstance().getCase(Case.getCurrentCaseThrows());
+ type = EamDb.getInstance().getCorrelationTypeById(CorrelationAttribute.FILES_TYPE_ID);
+ correlationCase = EamDb.getInstance().getCase(Case.getCurrentCaseThrows());
if (null == correlationCase) {
correlationCase = EamDb.getInstance().newCase(Case.getCurrentCaseThrows());
}
- CorrelationDataSource correlationDataSource = CorrelationDataSource.fromTSKDataSource(correlationCase, file.getDataSource());
- String value = file.getMd5Hash();
- String filePath = (file.getParentPath() + file.getName()).toLowerCase();
-
- correlationAttribute = EamDb.getInstance().getCorrelationAttribute(type, correlationCase, correlationDataSource, value, filePath);
- } catch (TskCoreException | EamDbException | NoCurrentCaseException ex) {
+ correlationDataSource = CorrelationDataSource.fromTSKDataSource(correlationCase, file.getDataSource());
+ value = file.getMd5Hash();
+ filePath = (file.getParentPath() + file.getName()).toLowerCase();
+ } catch (TskCoreException | EamDbException ex) {
logger.log(Level.SEVERE, "Error retrieving correlation attribute.", ex);
+ return null;
+ } catch (NoCurrentCaseException ex) {
+ logger.log(Level.SEVERE, "Case is closed.", ex);
+ return null;
+ }
+
+ try {
+ correlationAttribute = EamDb.getInstance().getCorrelationAttribute(type, correlationCase, correlationDataSource, value, filePath);
+ } catch (EamDbException ex) {
+ logger.log(Level.WARNING, String.format(
+ "Correlation attribute could not be retrieved for '%s' (id=%d): %s",
+ content.getName(), content.getId(), ex.getMessage()));
+ return null;
}
return correlationAttribute;
@@ -300,9 +316,12 @@ public class EamArtifactUtil {
af.getParentPath() + af.getName());
eamArtifact.addInstance(cei);
return eamArtifact;
- } catch (TskCoreException | EamDbException | NoCurrentCaseException ex) {
+ } catch (TskCoreException | EamDbException ex) {
logger.log(Level.SEVERE, "Error making correlation attribute.", ex);
return null;
+ } catch (NoCurrentCaseException ex) {
+ logger.log(Level.SEVERE, "Case is closed.", ex);
+ return null;
}
}
diff --git a/Core/src/org/sleuthkit/autopsy/commonfilesearch/FileInstanceNode.java b/Core/src/org/sleuthkit/autopsy/commonfilesearch/FileInstanceNode.java
index 07c87035e1..899aa5abbc 100644
--- a/Core/src/org/sleuthkit/autopsy/commonfilesearch/FileInstanceNode.java
+++ b/Core/src/org/sleuthkit/autopsy/commonfilesearch/FileInstanceNode.java
@@ -77,7 +77,7 @@ public class FileInstanceNode extends FileNode {
sheetSet.put(new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_filesColLbl(), Bundle.CommonFilesSearchResultsViewerTable_filesColLbl(), NO_DESCR, this.getContent().getName()));
sheetSet.put(new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_pathColLbl(), Bundle.CommonFilesSearchResultsViewerTable_pathColLbl(), NO_DESCR, this.getContent().getParentPath()));
- sheetSet.put(new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_hashsetHitsColLbl(), Bundle.CommonFilesSearchResultsViewerTable_hashsetHitsColLbl(), NO_DESCR, getHashSetHitsForFile(this.getContent())));
+ sheetSet.put(new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_hashsetHitsColLbl(), Bundle.CommonFilesSearchResultsViewerTable_hashsetHitsColLbl(), NO_DESCR, getHashSetHitsCsvList(this.getContent())));
sheetSet.put(new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_dataSourceColLbl(), Bundle.CommonFilesSearchResultsViewerTable_dataSourceColLbl(), NO_DESCR, this.getDataSource()));
sheetSet.put(new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_mimeTypeColLbl(), Bundle.CommonFilesSearchResultsViewerTable_mimeTypeColLbl(), NO_DESCR, StringUtils.defaultString(this.getContent().getMIMEType())));
diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultPanel.java b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultPanel.java
index ced154edf7..9d0a83c2ad 100644
--- a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultPanel.java
+++ b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultPanel.java
@@ -26,7 +26,7 @@ import java.util.Collection;
import java.util.Collections;
import java.util.List;
import javax.swing.JTabbedPane;
-import javax.swing.SwingWorker;
+import javax.swing.SwingUtilities;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import org.openide.explorer.ExplorerManager;
@@ -579,29 +579,6 @@ public class DataResultPanel extends javax.swing.JPanel implements DataResult, C
}
}
- /**
- * Worker for RootNodeListener childrenAdded.
- */
- class SetupTabsChildrenWorker extends SwingWorker {
-
- private final Node childNode;
-
- SetupTabsChildrenWorker(Node aChildNode) {
- childNode = aChildNode;
- }
-
- @Override
- protected Void doInBackground() throws Exception {
- setupTabs(childNode);
- return null;
- }
-
- @Override
- protected void done() {
- setupTabs(childNode);
- }
- }
-
/**
* Responds to changes in the root node due to asynchronous child node
* creation.
@@ -628,8 +605,13 @@ public class DataResultPanel extends javax.swing.JPanel implements DataResult, C
*/
if (waitingForData && containsReal(delta)) {
waitingForData = false;
- Node childNode = nme.getNode();
- new SetupTabsChildrenWorker(childNode).execute();
+ if (SwingUtilities.isEventDispatchThread()) {
+ setupTabs(nme.getNode());
+ } else {
+ SwingUtilities.invokeLater(() -> {
+ setupTabs(nme.getNode());
+ });
+ }
}
}
diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java
index 6ccf1a3c46..80d42614c1 100644
--- a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java
+++ b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java
@@ -141,7 +141,7 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
* Configure the child OutlineView (explorer view) component.
*/
outlineView.setAllowedDragActions(DnDConstants.ACTION_NONE);
-
+
outline = outlineView.getOutline();
outline.setRowSelectionAllowed(true);
outline.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
@@ -208,6 +208,11 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
@Override
@ThreadConfined(type = ThreadConfined.ThreadType.AWT)
public void setNode(Node rootNode) {
+ if (! SwingUtilities.isEventDispatchThread()) {
+ LOGGER.log(Level.SEVERE, "Attempting to run setNode() from non-EDT thread");
+ return;
+ }
+
/*
* The quick filter must be reset because when determining column width,
* ETable.getRowCount is called, and the documentation states that quick
@@ -281,7 +286,7 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
* let the table resize itself.
*/
outline.setAutoResizeMode((props.isEmpty()) ? JTable.AUTO_RESIZE_ALL_COLUMNS : JTable.AUTO_RESIZE_OFF);
-
+
assignColumns(props); // assign columns to match the properties
if (firstProp != null) {
((DefaultOutlineModel) outline.getOutlineModel()).setNodesColumnLabel(firstProp.getDisplayName());
diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/AbstractAbstractFileNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/AbstractAbstractFileNode.java
index 28329f17c5..1a52a61bb2 100644
--- a/Core/src/org/sleuthkit/autopsy/datamodel/AbstractAbstractFileNode.java
+++ b/Core/src/org/sleuthkit/autopsy/datamodel/AbstractAbstractFileNode.java
@@ -251,7 +251,7 @@ public abstract class AbstractAbstractFileNode extends A
map.put(TYPE_DIR.toString(), content.getDirType().getLabel());
map.put(TYPE_META.toString(), content.getMetaType().toString());
map.put(KNOWN.toString(), content.getKnown().getName());
- map.put(HASHSETS.toString(), getHashSetHitsForFile(content));
+ map.put(HASHSETS.toString(), getHashSetHitsCsvList(content));
map.put(MD5HASH.toString(), StringUtils.defaultString(content.getMd5Hash()));
map.put(ObjectID.toString(), content.getId());
map.put(MIMETYPE.toString(), StringUtils.defaultString(content.getMIMEType()));
@@ -263,7 +263,7 @@ public abstract class AbstractAbstractFileNode extends A
* to their sheets.
*
* @param sheetSet the modifiable Sheet.Set returned by
- * Sheet.get(Sheet.PROPERTIES)
+ * Sheet.get(Sheet.PROPERTIES)
*/
@NbBundle.Messages("AbstractAbstractFileNode.tagsProperty.displayName=Tags")
protected void addTagProperty(Sheet.Set sheetSet) {
@@ -301,7 +301,15 @@ public abstract class AbstractAbstractFileNode extends A
}
}
- public static String getHashSetHitsForFile(AbstractFile file) {
+ /**
+ * Gets a comma-separated values list of the names of the hash sets
+ * currently identified as including a given file.
+ *
+ * @param file The file.
+ *
+ * @return The CSV list of hash set names.
+ */
+ protected static String getHashSetHitsCsvList(AbstractFile file) {
try {
return StringUtils.join(file.getHashSetNames(), ", ");
} catch (TskCoreException tskCoreException) {
diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/AutopsyTreeChildrenFactory.java b/Core/src/org/sleuthkit/autopsy/datamodel/AutopsyTreeChildFactory.java
similarity index 97%
rename from Core/src/org/sleuthkit/autopsy/datamodel/AutopsyTreeChildrenFactory.java
rename to Core/src/org/sleuthkit/autopsy/datamodel/AutopsyTreeChildFactory.java
index 9573347eb9..70f0ca3ce6 100644
--- a/Core/src/org/sleuthkit/autopsy/datamodel/AutopsyTreeChildrenFactory.java
+++ b/Core/src/org/sleuthkit/autopsy/datamodel/AutopsyTreeChildFactory.java
@@ -41,9 +41,9 @@ import org.sleuthkit.datamodel.TskCoreException;
* Child factory to create the top level children of the autopsy tree
*
*/
-public class AutopsyTreeChildrenFactory extends ChildFactory.Detachable