diff --git a/Core/src/org/sleuthkit/autopsy/commonfilesearch/AllDataSourcesCommonFilesAlgorithm.java b/Core/src/org/sleuthkit/autopsy/commonfilesearch/AllDataSourcesCommonFilesAlgorithm.java index 22816294dd..f752fbabad 100644 --- a/Core/src/org/sleuthkit/autopsy/commonfilesearch/AllDataSourcesCommonFilesAlgorithm.java +++ b/Core/src/org/sleuthkit/autopsy/commonfilesearch/AllDataSourcesCommonFilesAlgorithm.java @@ -29,7 +29,9 @@ final class AllDataSourcesCommonFilesAlgorithm extends CommonFilesMetadataBuilde private static final String WHERE_CLAUSE = "%s md5 in (select md5 from tsk_files where (known != 1 OR known IS NULL)%s GROUP BY md5 HAVING COUNT(*) > 1) order by md5"; //NON-NLS /** - * Implements the algorithm for getting common files across all data sources. + * Implements the algorithm for getting common files across all data + * sources. + * * @param dataSourceIdMap a map of obj_id to datasource name * @param filterByMediaMimeType match only on files whose mime types can be broadly categorized as media types * @param filterByDocMimeType match only on files whose mime types can be broadly categorized as document types diff --git a/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesMetadata.java b/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesMetadata.java index ef061e601f..7b7b10b828 100644 --- a/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesMetadata.java +++ b/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesMetadata.java @@ -32,12 +32,13 @@ final class CommonFilesMetadata { /** * Create meta dat object which can be handed off to the node factories + * * @param metadata map of md5 to parent-level node meta data */ CommonFilesMetadata(Map metadata) { this.metadata = metadata; } - + /** * Find the meta data for the given md5. * @@ -63,7 +64,7 @@ final class CommonFilesMetadata { int count = 0; for (Md5Metadata data : this.metadata.values()) { count += data.size(); - } + } return count; } } diff --git a/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesMetadataBuilder.java b/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesMetadataBuilder.java index 66e16a93e7..1646f2c97b 100644 --- a/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesMetadataBuilder.java +++ b/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesMetadataBuilder.java @@ -238,21 +238,22 @@ abstract class CommonFilesMetadataBuilder { "CommonFilesMetadataBuilder.buildTabTitle.titleSingle=Common Files (Match Within Data Source: %s, %s)" }) protected abstract String buildTabTitle(); - + @NbBundle.Messages({ "CommonFilesMetadataBuilder.buildCategorySelectionString.doc=Documents", "CommonFilesMetadataBuilder.buildCategorySelectionString.media=Media", "CommonFilesMetadataBuilder.buildCategorySelectionString.all=All File Categories" }) - protected String buildCategorySelectionString(){ - if(!this.filterByDoc && !this.filterByMedia){ + + protected String buildCategorySelectionString() { + if (!this.filterByDoc && !this.filterByMedia) { return Bundle.CommonFilesMetadataBuilder_buildCategorySelectionString_all(); } else { - List filters = new ArrayList(); - if(this.filterByDoc){ + List filters = new ArrayList<>(); + if (this.filterByDoc) { filters.add(Bundle.CommonFilesMetadataBuilder_buildCategorySelectionString_doc()); } - if(this.filterByMedia){ + if (this.filterByMedia) { filters.add(Bundle.CommonFilesMetadataBuilder_buildCategorySelectionString_media()); } return String.join(", ", filters); diff --git a/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesNode.java b/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesNode.java index 28c14c620d..677d6ba8b5 100644 --- a/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesNode.java +++ b/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesNode.java @@ -34,6 +34,7 @@ import org.sleuthkit.autopsy.datamodel.DisplayableItemNodeVisitor; */ final public class CommonFilesNode extends DisplayableItemNode { + CommonFilesNode(CommonFilesMetadata metadataList) { super(Children.create(new Md5NodeFactory(metadataList), true), Lookups.singleton(CommonFilesNode.class)); } @@ -79,7 +80,7 @@ final public class CommonFilesNode extends DisplayableItemNode { protected void removeNotify() { metadata = null; } - + @Override protected Node createNodeForKey(String md5){ Md5Metadata metadata = this.metadata.getMetadataForMd5(md5); diff --git a/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesPanel.java b/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesPanel.java index 26c2a6b50c..6b8fada124 100644 --- a/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesPanel.java +++ b/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesPanel.java @@ -274,11 +274,11 @@ public final class CommonFilesPanel extends javax.swing.JPanel { setTitleForSingleSource(dataSourceId); } - + this.tabTitle = builder.buildTabTitle(); - + CommonFilesMetadata metadata = builder.findCommonFiles(); - + return metadata; } diff --git a/Core/src/org/sleuthkit/autopsy/commonfilesearch/FileInstanceMetadata.java b/Core/src/org/sleuthkit/autopsy/commonfilesearch/FileInstanceMetadata.java index 72319d4045..0d0b3e9844 100644 --- a/Core/src/org/sleuthkit/autopsy/commonfilesearch/FileInstanceMetadata.java +++ b/Core/src/org/sleuthkit/autopsy/commonfilesearch/FileInstanceMetadata.java @@ -52,4 +52,5 @@ final public class FileInstanceMetadata { public String getDataSourceName(){ return this.dataSourceName; } + } diff --git a/Core/src/org/sleuthkit/autopsy/commonfilesearch/Md5Metadata.java b/Core/src/org/sleuthkit/autopsy/commonfilesearch/Md5Metadata.java index 218d0fa006..39c2cf8040 100644 --- a/Core/src/org/sleuthkit/autopsy/commonfilesearch/Md5Metadata.java +++ b/Core/src/org/sleuthkit/autopsy/commonfilesearch/Md5Metadata.java @@ -59,7 +59,7 @@ final public class Md5Metadata { } public String getDataSources() { - Set sources = new HashSet (); + Set sources = new HashSet<> (); for(FileInstanceMetadata data : this.fileInstances){ sources.add(data.getDataSourceName()); } diff --git a/Core/src/org/sleuthkit/autopsy/commonfilesearch/SingleDataSource.java b/Core/src/org/sleuthkit/autopsy/commonfilesearch/SingleDataSource.java index 1c10ef92d9..bc506f5988 100644 --- a/Core/src/org/sleuthkit/autopsy/commonfilesearch/SingleDataSource.java +++ b/Core/src/org/sleuthkit/autopsy/commonfilesearch/SingleDataSource.java @@ -32,7 +32,7 @@ final class SingleDataSource extends CommonFilesMetadataBuilder { /** * Implements the algorithm for getting common files that appear at least - * once in the given data source. + * once in the given data source * @param dataSourceId data source id for which common files must appear at least once * @param dataSourceIdMap a map of obj_id to datasource name * @param filterByMediaMimeType match only on files whose mime types can be broadly categorized as media types diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java index fc7c997435..1089bc62f9 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java @@ -141,7 +141,6 @@ public final class DataResultViewerTable extends AbstractDataResultViewer { */ outlineView.setAllowedDragActions(DnDConstants.ACTION_NONE); - outline = outlineView.getOutline(); outline.setRowSelectionAllowed(true); outline.setColumnSelectionAllowed(true);