From a191c73eeae64f5349a5999588ac6c1bdca79866 Mon Sep 17 00:00:00 2001 From: jmillman Date: Fri, 30 Oct 2015 14:23:10 -0400 Subject: [PATCH] don't check for duplicate tags at all --- .../autopsy/actions/AddContentTagAction.java | 23 ++----------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/actions/AddContentTagAction.java b/Core/src/org/sleuthkit/autopsy/actions/AddContentTagAction.java index b1ea2b31f4..d504600446 100755 --- a/Core/src/org/sleuthkit/autopsy/actions/AddContentTagAction.java +++ b/Core/src/org/sleuthkit/autopsy/actions/AddContentTagAction.java @@ -19,7 +19,6 @@ package org.sleuthkit.autopsy.actions; import java.util.Collection; -import java.util.List; import java.util.logging.Level; import javax.swing.JOptionPane; import javax.swing.SwingUtilities; @@ -30,7 +29,6 @@ import org.sleuthkit.autopsy.casemodule.services.TagsManager; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.datamodel.AbstractFile; import org.sleuthkit.datamodel.Content; -import org.sleuthkit.datamodel.ContentTag; import org.sleuthkit.datamodel.TagName; import org.sleuthkit.datamodel.TskCoreException; @@ -120,25 +118,8 @@ public class AddContentTagAction extends AddTagAction { continue; } } - // check if the same tag is being added for the same abstract file. - TagsManager tagsManager = Case.getCurrentCase().getServices().getTagsManager(); - List contentTagList = tagsManager.getContentTagsByContent(file); - for (ContentTag contentTag : contentTagList) { - if (contentTag.getName().getDisplayName().equals(tagName.getDisplayName())) { - AbstractFile fileCopy = file; - SwingUtilities.invokeLater(() -> { - JOptionPane.showMessageDialog(null, - NbBundle.getMessage(this.getClass(), - "AddContentTagAction.tagExists", - fileCopy.getName(), tagName.getDisplayName()), - NbBundle.getMessage(this.getClass(), - "AddContentTagAction.cannotApplyTagErr"), - JOptionPane.WARNING_MESSAGE); - }); - return; - } - } - tagsManager.addContentTag(file, tagName, comment); + + Case.getCurrentCase().getServices().getTagsManager().addContentTag(file, tagName, comment); } catch (TskCoreException ex) { Logger.getLogger(AddContentTagAction.class.getName()).log(Level.SEVERE, "Error tagging result", ex); //NON-NLS AbstractFile fileCopy = file;