mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-13 00:16:16 +00:00
Fixed codacy issues
This commit is contained in:
parent
0ba42f1d4e
commit
9f08d3bed0
@ -40,7 +40,7 @@ import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.casemodule.services.TagsManager;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.tags.TagUtilities;
|
||||
import org.sleuthkit.autopsy.tags.TagUtils;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifactTag;
|
||||
import org.sleuthkit.datamodel.TagName;
|
||||
@ -194,7 +194,7 @@ public class DeleteFileBlackboardArtifactTagAction extends AbstractAction implem
|
||||
TagName tagName = entry.getValue();
|
||||
for (BlackboardArtifactTag artifactTag : existingTagsList) {
|
||||
if (tagDisplayName.equals(artifactTag.getName().getDisplayName())) {
|
||||
JMenuItem tagNameItem = new JMenuItem(TagUtilities.getDecoratedTagDisplayName(tagName));
|
||||
JMenuItem tagNameItem = new JMenuItem(TagUtils.getDecoratedTagDisplayName(tagName));
|
||||
tagNameItem.addActionListener((ActionEvent e) -> {
|
||||
deleteTag(tagName, artifactTag, artifact.getArtifactID());
|
||||
});
|
||||
|
@ -40,7 +40,7 @@ import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.casemodule.services.TagsManager;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.tags.TagUtilities;
|
||||
import org.sleuthkit.autopsy.tags.TagUtils;
|
||||
import org.sleuthkit.datamodel.AbstractFile;
|
||||
import org.sleuthkit.datamodel.ContentTag;
|
||||
import org.sleuthkit.datamodel.TagName;
|
||||
@ -199,7 +199,7 @@ public class DeleteFileContentTagAction extends AbstractAction implements Presen
|
||||
TagName tagName = entry.getValue();
|
||||
for (ContentTag contentTag : existingTagsList) {
|
||||
if (tagDisplayName.equals(contentTag.getName().getDisplayName())) {
|
||||
JMenuItem tagNameItem = new JMenuItem(TagUtilities.getDecoratedTagDisplayName(tagName));
|
||||
JMenuItem tagNameItem = new JMenuItem(TagUtils.getDecoratedTagDisplayName(tagName));
|
||||
tagNameItem.addActionListener((ActionEvent e) -> {
|
||||
deleteTag(tagName, contentTag, file.getId());
|
||||
});
|
||||
|
@ -41,7 +41,7 @@ import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.casemodule.services.TagsManager;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.tags.TagUtilities;
|
||||
import org.sleuthkit.autopsy.tags.TagUtils;
|
||||
import org.sleuthkit.datamodel.TagName;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
|
||||
@ -128,7 +128,7 @@ public class GetTagNameAndCommentDialog extends JDialog {
|
||||
|
||||
@Override
|
||||
public Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
|
||||
String newValue = TagUtilities.getDecoratedTagDisplayName((TagName) value);
|
||||
String newValue = TagUtils.getDecoratedTagDisplayName((TagName) value);
|
||||
return super.getListCellRendererComponent(list, newValue, index, isSelected, cellHasFocus);
|
||||
}
|
||||
});
|
||||
|
@ -28,7 +28,6 @@ import javax.swing.event.DocumentListener;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.util.NbBundle.Messages;
|
||||
import org.openide.windows.WindowManager;
|
||||
import org.sleuthkit.autopsy.casemodule.services.TagsManager;
|
||||
import org.sleuthkit.datamodel.TskData;
|
||||
|
||||
@Messages({"TagNameDialog.descriptionLabel.text=Description:",
|
||||
|
@ -39,7 +39,7 @@ import org.sleuthkit.autopsy.casemodule.services.TagsManager;
|
||||
import org.sleuthkit.autopsy.core.UserPreferences;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.ingest.IngestManager;
|
||||
import org.sleuthkit.autopsy.tags.TagUtilities;
|
||||
import org.sleuthkit.autopsy.tags.TagUtils;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifactTag;
|
||||
import org.sleuthkit.datamodel.ContentTag;
|
||||
import org.sleuthkit.datamodel.TagName;
|
||||
@ -285,7 +285,7 @@ public class Tags implements AutopsyVisitableItem {
|
||||
public TagNameNode(TagName tagName) {
|
||||
super(Children.create(new TagTypeNodeFactory(tagName), true), Lookups.singleton(NbBundle.getMessage(TagNameNode.class, "TagNameNode.namePlusTags.text", tagName.getDisplayName())));
|
||||
this.tagName = tagName;
|
||||
setName(TagUtilities.getDecoratedTagDisplayName(tagName));
|
||||
setName(TagUtils.getDecoratedTagDisplayName(tagName));
|
||||
updateDisplayName();
|
||||
if (tagName.getDisplayName().equals(TagsManager.getBookmarkTagDisplayName())) {
|
||||
setIconBaseWithExtension(BOOKMARK_TAG_ICON_PATH);
|
||||
@ -320,7 +320,7 @@ public class Tags implements AutopsyVisitableItem {
|
||||
} catch (TskCoreException | NoCurrentCaseException ex) {
|
||||
Logger.getLogger(TagNameNode.class.getName()).log(Level.SEVERE, "Failed to get tags count for " + tagName.getDisplayName() + " tag name", ex); //NON-NLS
|
||||
}
|
||||
setDisplayName(TagUtilities.getDecoratedTagDisplayName(tagName) + " \u200E(\u200E" + tagsCount + ")\u200E");
|
||||
setDisplayName(TagUtils.getDecoratedTagDisplayName(tagName) + " \u200E(\u200E" + tagsCount + ")\u200E");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -41,7 +41,7 @@ import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.HashDb;
|
||||
import org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager;
|
||||
import org.sleuthkit.autopsy.modules.hashdatabase.HashLookupSettingsPanel;
|
||||
import org.sleuthkit.autopsy.tags.TagUtilities;
|
||||
import org.sleuthkit.autopsy.tags.TagUtils;
|
||||
import org.sleuthkit.datamodel.TagName;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
|
||||
@ -221,7 +221,7 @@ class SaveTaggedHashesToHashDbConfigPanel extends javax.swing.JPanel {
|
||||
setFont(list.getFont());
|
||||
setBackground(list.getBackground());
|
||||
setForeground(list.getForeground());
|
||||
setText(TagUtilities.getDecoratedTagDisplayName(value));
|
||||
setText(TagUtils.getDecoratedTagDisplayName(value));
|
||||
return this;
|
||||
}
|
||||
return new JLabel();
|
||||
|
@ -29,11 +29,11 @@ import org.sleuthkit.datamodel.TskData;
|
||||
*
|
||||
* Utility methods for Tags.
|
||||
*/
|
||||
public class TagUtilities {
|
||||
public final class TagUtils {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(TagUtilities.class.getName());
|
||||
private static final Logger logger = Logger.getLogger(TagUtils.class.getName());
|
||||
|
||||
private TagUtilities() {
|
||||
private TagUtils() {
|
||||
// Intentionally empty constructor;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user