From 773cf2619898289e6950e7325ea27a752b543cfa Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Wed, 15 Feb 2017 12:18:35 -0500 Subject: [PATCH] 2199 Formatting, copyright, and netbeans tips resolution --- .../AddImageWizardAddingProgressPanel.java | 4 ++-- .../AddImageWizardChooseDataSourcePanel.java | 8 +++----- .../casemodule/AddImageWizardIterator.java | 4 ++-- .../MultiUserSettingsPanelController.java | 2 +- .../datamodel/VirtualDirectoryNode.java | 2 +- .../DirectoryTreeTopComponent.java | 8 ++++++-- .../ExternalViewerOptionsPanelController.java | 10 +++++----- .../ingest/IngestOptionsPanelController.java | 2 +- .../autopsy/ingest/IngestTasksScheduler.java | 3 +-- .../IngestModulesConfigWizardPanel.java | 3 +-- .../IngestProfileSelectionWizardPanel.java | 5 +++-- ...FileExtMismatchOptionsPanelController.java | 18 ++++++++++++++++-- .../FileTypeIdOptionsPanelController.java | 19 ++++++++++++++++--- .../HashDatabaseOptionsPanelController.java | 2 +- .../modules/interestingitems/FilesSet.java | 2 +- .../interestingitems/FilesSetDefsPanel.java | 2 +- ...restingItemDefsOptionsPanelController.java | 2 +- 17 files changed, 62 insertions(+), 34 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardAddingProgressPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardAddingProgressPanel.java index c39e541f25..8b1a4dd1e0 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardAddingProgressPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardAddingProgressPanel.java @@ -54,7 +54,7 @@ class AddImageWizardAddingProgressPanel extends ShortcutWizardDescriptorPanel { private AddImageWizardAddingProgressVisual component; private final Set listeners = new HashSet<>(1); // or can use ChangeSupport in NB 6.0 - private DSPProgressMonitorImpl dspProgressMonitorImpl = new DSPProgressMonitorImpl(); + private final DSPProgressMonitorImpl dspProgressMonitorImpl = new DSPProgressMonitorImpl(); public DSPProgressMonitorImpl getDSPProgressMonitorImpl() { return dspProgressMonitorImpl; @@ -193,7 +193,7 @@ class AddImageWizardAddingProgressPanel extends ShortcutWizardDescriptorPanel { protected final void fireChangeEvent() { Iterator it; synchronized (listeners) { - it = new HashSet(listeners).iterator(); + it = new HashSet<>(listeners).iterator(); } ChangeEvent ev = new ChangeEvent(this); while (it.hasNext()) { diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardChooseDataSourcePanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardChooseDataSourcePanel.java index 65847a6eba..3d58017ecb 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardChooseDataSourcePanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardChooseDataSourcePanel.java @@ -45,7 +45,7 @@ class AddImageWizardChooseDataSourcePanel extends ShortcutWizardDescriptorPanel * The visual component that displays this panel. If you need to access the * component from this class, just use getComponent(). */ - private AddImageWizardAddingProgressPanel progressPanel; + private final AddImageWizardAddingProgressPanel progressPanel; private AddImageWizardChooseDataSourceVisual component; private boolean isNextEnable = false; private static final String PROP_LASTDATASOURCE_PATH = "LBL_LastDataSource_PATH"; //NON-NLS @@ -123,7 +123,7 @@ class AddImageWizardChooseDataSourcePanel extends ShortcutWizardDescriptorPanel isNextEnable = isEnabled; fireChangeEvent(); } - private final Set listeners = new HashSet(1); // or can use ChangeSupport in NB 6.0 + private final Set listeners = new HashSet<>(1); // or can use ChangeSupport in NB 6.0 /** * Adds a listener to changes of the panel's validity. @@ -156,7 +156,7 @@ class AddImageWizardChooseDataSourcePanel extends ShortcutWizardDescriptorPanel protected final void fireChangeEvent() { Iterator it; synchronized (listeners) { - it = new HashSet(listeners).iterator(); + it = new HashSet<>(listeners).iterator(); } ChangeEvent ev = new ChangeEvent(this); while (it.hasNext()) { @@ -219,8 +219,6 @@ class AddImageWizardChooseDataSourcePanel extends ShortcutWizardDescriptorPanel */ @Override public void storeSettings(WizardDescriptor settings) { - - return; } /** diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardIterator.java b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardIterator.java index 8616f5bc67..3dafa75479 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardIterator.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardIterator.java @@ -38,7 +38,7 @@ class AddImageWizardIterator implements WizardDescriptor.Iterator panels; - private AddImageAction action; + private final AddImageAction action; private int progressPanelIndex; private final static String PROP_LASTPROFILE_NAME = "AIW_LASTPROFILE_NAME"; //NON-NLS @@ -74,7 +74,7 @@ class AddImageWizardIterator implements WizardDescriptor.Iterator sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/VirtualDirectoryNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/VirtualDirectoryNode.java index 40f14bf63a..8a056b2318 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/VirtualDirectoryNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/VirtualDirectoryNode.java @@ -48,7 +48,7 @@ import org.sleuthkit.datamodel.VirtualDirectory; */ public class VirtualDirectoryNode extends AbstractAbstractFileNode { - private static Logger logger = Logger.getLogger(VirtualDirectoryNode.class.getName()); + private static final Logger logger = Logger.getLogger(VirtualDirectoryNode.class.getName()); //prefix for special VirtualDirectory root nodes grouping local files public final static String LOGICAL_FILE_SET_PREFIX = "LogicalFileSet"; //NON-NLS diff --git a/Core/src/org/sleuthkit/autopsy/directorytree/DirectoryTreeTopComponent.java b/Core/src/org/sleuthkit/autopsy/directorytree/DirectoryTreeTopComponent.java index 22b4677c36..4cbf5fa283 100644 --- a/Core/src/org/sleuthkit/autopsy/directorytree/DirectoryTreeTopComponent.java +++ b/Core/src/org/sleuthkit/autopsy/directorytree/DirectoryTreeTopComponent.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2016 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -297,6 +297,8 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat * only, i.e. deserialization routines; otherwise you could get a * non-deserialized instance. To obtain the singleton instance, use * {@link #findInstance}. + * + * @return instance - the default instance */ public static synchronized DirectoryTreeTopComponent getDefault() { if (instance == null) { @@ -308,6 +310,8 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat /** * Obtain the DirectoryTreeTopComponent instance. Never call * {@link #getDefault} directly! + * + * @return getDefault() - the default instance */ public static synchronized DirectoryTreeTopComponent findInstance() { WindowManager winManager = WindowManager.getDefault(); @@ -667,7 +671,7 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat try { displayName = content.getUniquePath(); } catch (TskCoreException ex) { - LOGGER.log(Level.SEVERE, "Exception while calling Content.getUniquePath() for node: " + originNode); //NON-NLS + LOGGER.log(Level.SEVERE, "Exception while calling Content.getUniquePath() for node: {0}", originNode); //NON-NLS } } else if (originNode.getLookup().lookup(String.class) != null) { displayName = originNode.getLookup().lookup(String.class); diff --git a/Core/src/org/sleuthkit/autopsy/directorytree/ExternalViewerOptionsPanelController.java b/Core/src/org/sleuthkit/autopsy/directorytree/ExternalViewerOptionsPanelController.java index 5df5b89e56..ee65dfbf1c 100755 --- a/Core/src/org/sleuthkit/autopsy/directorytree/ExternalViewerOptionsPanelController.java +++ b/Core/src/org/sleuthkit/autopsy/directorytree/ExternalViewerOptionsPanelController.java @@ -1,15 +1,15 @@ /* * Autopsy Forensic Browser - * - * Copyright 2011-2016 Basis Technology Corp. + * + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestOptionsPanelController.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestOptionsPanelController.java index b9c4ea9546..9c908d9ebb 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestOptionsPanelController.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestOptionsPanelController.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2017 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestTasksScheduler.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestTasksScheduler.java index f7c32930c0..a9ad8c7634 100755 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestTasksScheduler.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestTasksScheduler.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2012-2016 Basis Technology Corp. + * Copyright 2012-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -32,7 +32,6 @@ import java.util.concurrent.LinkedBlockingQueue; import java.util.logging.Level; import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.openide.util.Exceptions; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.datamodel.AbstractFile; import org.sleuthkit.datamodel.Content; diff --git a/Core/src/org/sleuthkit/autopsy/ingest/runIngestModuleWizard/IngestModulesConfigWizardPanel.java b/Core/src/org/sleuthkit/autopsy/ingest/runIngestModuleWizard/IngestModulesConfigWizardPanel.java index 0124db327b..c330df974e 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/runIngestModuleWizard/IngestModulesConfigWizardPanel.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/runIngestModuleWizard/IngestModulesConfigWizardPanel.java @@ -26,9 +26,8 @@ import org.openide.util.NbBundle; import org.sleuthkit.autopsy.ingest.IngestJobSettings; import org.sleuthkit.autopsy.ingest.IngestJobSettingsPanel; - class IngestModulesConfigWizardPanel extends ShortcutWizardDescriptorPanel { - + @NbBundle.Messages("IngestModulesConfigWizardPanel.name.text=Configure Ingest Modules") /** diff --git a/Core/src/org/sleuthkit/autopsy/ingest/runIngestModuleWizard/IngestProfileSelectionWizardPanel.java b/Core/src/org/sleuthkit/autopsy/ingest/runIngestModuleWizard/IngestProfileSelectionWizardPanel.java index 08c416998e..207e577bf1 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/runIngestModuleWizard/IngestProfileSelectionWizardPanel.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/runIngestModuleWizard/IngestProfileSelectionWizardPanel.java @@ -40,8 +40,9 @@ public class IngestProfileSelectionWizardPanel extends ShortcutWizardDescriptorP private final Set listeners = new HashSet<>(1); private final static String LAST_PROFILE_PROPERTIES_FILE = "IngestProfileSelectionPanel"; //NON-NLS /** - * The visual ingestProfileSelectionPanel that displays this panel. If you need to access the - ingestProfileSelectionPanel from this class, just use getComponent(). + * The visual ingestProfileSelectionPanel that displays this panel. If you + * need to access the ingestProfileSelectionPanel from this class, just use + * getComponent(). */ private IngestProfileSelectionPanel ingestProfileSelectionPanel; private String lastProfileUsed; diff --git a/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/FileExtMismatchOptionsPanelController.java b/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/FileExtMismatchOptionsPanelController.java index 93eef3c0a0..be5d476c5b 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/FileExtMismatchOptionsPanelController.java +++ b/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/FileExtMismatchOptionsPanelController.java @@ -1,6 +1,20 @@ /* - * To change this template, choose Tools | Templates - * and open the template in the editor. + * Autopsy Forensic Browser + * + * Copyright 2011-2017 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.sleuthkit.autopsy.modules.fileextmismatch; diff --git a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeIdOptionsPanelController.java b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeIdOptionsPanelController.java index 434e17d463..624cdb747c 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeIdOptionsPanelController.java +++ b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeIdOptionsPanelController.java @@ -1,7 +1,20 @@ /* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. + * Autopsy Forensic Browser + * + * Copyright 2011-2017 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.sleuthkit.autopsy.modules.filetypeid; diff --git a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/HashDatabaseOptionsPanelController.java b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/HashDatabaseOptionsPanelController.java index c2c52a4097..cd320258ce 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/HashDatabaseOptionsPanelController.java +++ b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/HashDatabaseOptionsPanelController.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSet.java b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSet.java index cbb3576b41..6fb44839b5 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSet.java +++ b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSet.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2014 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetDefsPanel.java b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetDefsPanel.java index 184b5d8b46..b4743bd360 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetDefsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetDefsPanel.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2016 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/InterestingItemDefsOptionsPanelController.java b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/InterestingItemDefsOptionsPanelController.java index 7280f3b7ab..3a579d7b51 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/InterestingItemDefsOptionsPanelController.java +++ b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/InterestingItemDefsOptionsPanelController.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2014 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License");