testmethod

This commit is contained in:
lmaldacker 2021-02-11 12:44:36 +01:00
parent c16f583ce1
commit db5baee889

View File

@ -139,7 +139,8 @@ public class Section {
});
}
public void dismissByRegEx(String type, String pattern, boolean patternCaseInsensitive, int group, int ruleNumber, String reason) {
public void dismissByRegEx(String type, String pattern, boolean patternCaseInsensitive, int group) {
Pattern compiledPattern = Patterns.getCompiledPattern(pattern, patternCaseInsensitive);
@ -155,9 +156,7 @@ public class Section {
while (matcher.find()) {
String match = matcher.group(group);
if (StringUtils.isNotBlank(match)) {
entity.setRedaction(false);
entity.setMatchedRule(ruleNumber);
entity.setRedactionReason(reason);
expanded.addAll(findEntities(entity.getWord() + match, type, false, entity.isRedaction(), 0, null, null));
}
}
}