[TR-152] TagSet should detect a tag in both process and skip entries Created: 31/Mar/11  Updated: 05/Apr/11  Resolved: 05/Apr/11

Status: Resolved
Project: Terrier Core
Component/s: .utility, tests
Affects Version/s: None
Fix Version/s: 3.5

Type: Improvement Priority: Major
Reporter: Richard McCreadie Assignee: Craig Macdonald
Resolution: Fixed  
Labels: None


 Comments   
Comment by Craig Macdonald [ 05/Apr/11 ]

Trivial patch:

Index: src/core/org/terrier/utility/TagSet.java
===================================================================
--- src/core/org/terrier/utility/TagSet.java	(revision 3272)
+++ src/core/org/terrier/utility/TagSet.java	(working copy)
@@ -211,7 +211,11 @@
 					whiteList.add(t);
 			for (String t : blackListTags.split("\\s*,\\s*"))
 				if (t.length() > 0)
+				{
+					if (whiteList.contains(t))
+						throw new IllegalArgumentException(prefix+".process" + " and " + prefix+".skip" + " cannot both contain tag " + t);
 					blackList.add(t);
+				}
 			idTag = ApplicationSetup.getProperty(prefix+".idtag","");
 			docTag = ApplicationSetup.getProperty(prefix+".doctag","");
 			if (!caseSensitive)

Comment by Craig Macdonald [ 05/Apr/11 ]

Trivial fix. Added inital junit test for TagSet as well.

Generated at Mon Dec 11 09:14:25 GMT 2017 using JIRA 7.1.1#71004-sha1:d6b2c0d9b7051e9fb5e4eb8ce177ca56d91d7bd8.