From a01585d7c4b4c1eff16e9956683559ade59cd042 Mon Sep 17 00:00:00 2001 From: Brian Sweeney Date: Mon, 9 Apr 2018 09:42:05 -0600 Subject: [PATCH] Merge branch 'develop' of https://github.com/briangsweeney/autopsy into 3624-tree-table-view # Conflicts: # Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java --- .../commonfilesearch/CommonFilesMetaData.java | 1 - .../CommonFilesMetaDataBuilder.java | 11 ++++++----- .../commonfilesearch/CommonFilesPanel.java | 1 + .../CommonFilesSearchAction.java | 2 +- .../datamodel/CommonFileParentNode.java | 19 +++++++++---------- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesMetaData.java b/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesMetaData.java index 65db9d319d..bdf521a362 100644 --- a/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesMetaData.java +++ b/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesMetaData.java @@ -60,5 +60,4 @@ public class CommonFilesMetaData { public String getDataSources() { return dataSources; } - } diff --git a/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesMetaDataBuilder.java b/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesMetaDataBuilder.java index 5d663a6f9d..bf190f7804 100644 --- a/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesMetaDataBuilder.java +++ b/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesMetaDataBuilder.java @@ -80,10 +80,12 @@ abstract class CommonFilesMetaDataBuilder { return metaDataModels; } - + /** - * Should build a SQL WHERE clause to be passed to SleuthkitCase.findAllFilesWhere(sql) - * which will select the desired common files ordered by MD5. + * Should build a SQL WHERE clause to be passed to + * SleuthkitCase.findAllFilesWhere(sql) which will select the desired common + * files ordered by MD5. + * * @return sql string where clause */ protected abstract String buildSqlWhereClause(); @@ -107,7 +109,6 @@ abstract class CommonFilesMetaDataBuilder { addDataSource(dataSources, file, dataSourceIdToNameMap); md5ToDataSourcesStringMap.put(currentMd5, dataSources); } - } } @@ -118,4 +119,4 @@ abstract class CommonFilesMetaDataBuilder { List files = sleuthkitCase.findAllFilesWhere(whereClause); return files; } -} \ No newline at end of file +} diff --git a/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesPanel.java b/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesPanel.java index 511585c67e..28fa3fda36 100644 --- a/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesPanel.java +++ b/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesPanel.java @@ -197,6 +197,7 @@ public final class CommonFilesPanel extends javax.swing.JPanel { } @Override + @SuppressWarnings({"BoxedValueEquality", "NumberEquality"}) protected List doInBackground() throws TskCoreException, NoCurrentCaseException, SQLException { Long dataSourceId = determineDataSourceId(); diff --git a/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesSearchAction.java b/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesSearchAction.java index 9915720f35..a3384fb55f 100644 --- a/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesSearchAction.java +++ b/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesSearchAction.java @@ -30,7 +30,7 @@ import org.sleuthkit.autopsy.coreutils.Logger; final class CommonFilesSearchAction extends CallableSystemAction { private static final Logger LOGGER = Logger.getLogger(CommonFilesPanel.class.getName()); - + private static CommonFilesSearchAction instance = null; private static final long serialVersionUID = 1L; diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/CommonFileParentNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/CommonFileParentNode.java index 9e196875b5..2d7a06108b 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/CommonFileParentNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/CommonFileParentNode.java @@ -44,12 +44,12 @@ public class CommonFileParentNode extends DisplayableItemNode { public CommonFileParentNode(CommonFilesMetaData metaData) { super(Children.create( new CommonFilesChildFactory(metaData.getChildren(), - metaData.getDataSourceIdToNameMap()), true), + metaData.getDataSourceIdToNameMap()), true), Lookups.singleton(metaData.getMd5())); this.commonFileCount = metaData.getChildren().size(); this.dataSources = metaData.getDataSources(); this.md5Hash = metaData.getMd5(); - + this.setDisplayName(md5Hash); } @@ -60,8 +60,8 @@ public class CommonFileParentNode extends DisplayableItemNode { String getDataSources() { return this.dataSources; } - - public String getMd5(){ + + public String getMd5() { return this.md5Hash; } @@ -73,7 +73,7 @@ public class CommonFileParentNode extends DisplayableItemNode { sheetSet = Sheet.createPropertiesSet(); sheet.put(sheetSet); } - + Map map = new LinkedHashMap<>(); fillPropertyMap(map, this); @@ -113,7 +113,6 @@ public class CommonFileParentNode extends DisplayableItemNode { public String getItemType() { return getClass().getName(); } - /** * Child generator for FileNodes of CommonFileParentNodes @@ -121,15 +120,15 @@ public class CommonFileParentNode extends DisplayableItemNode { static class CommonFilesChildFactory extends ChildFactory { private final List descendants; - private final Map dataSourceMap; + private final Map dataSourceMap; - CommonFilesChildFactory(List descendants, Map dataSourceMap){ + CommonFilesChildFactory(List descendants, Map dataSourceMap) { this.descendants = descendants; this.dataSourceMap = dataSourceMap; } @Override - protected Node createNodeForKey(AbstractFile file){ + protected Node createNodeForKey(AbstractFile file) { final String dataSource = this.dataSourceMap.get(file.getDataSourceObjectId()); @@ -141,8 +140,8 @@ public class CommonFileParentNode extends DisplayableItemNode { list.addAll(this.descendants); return true; } - } + @NbBundle.Messages({ "CommonFileParentPropertyType.fileColLbl=File", "CommonFileParentPropertyType.instanceColLbl=Instance Count",