RED-3061: Logic for value matcher for initials expansion rule is inverted
This commit is contained in:
parent
1b9251b0a2
commit
1ccf0ab493
@ -187,12 +187,12 @@ public class Section {
|
|||||||
public void expandByRegEx(@Argument(ArgumentType.TYPE) String type, @Argument(ArgumentType.REGEX) String suffixPattern,
|
public void expandByRegEx(@Argument(ArgumentType.TYPE) String type, @Argument(ArgumentType.REGEX) String suffixPattern,
|
||||||
@Argument(ArgumentType.BOOLEAN) boolean patternCaseInsensitive,
|
@Argument(ArgumentType.BOOLEAN) boolean patternCaseInsensitive,
|
||||||
@Argument(ArgumentType.INTEGER) int group,
|
@Argument(ArgumentType.INTEGER) int group,
|
||||||
@Argument(ArgumentType.REGEX) String compiledValuePattern) {
|
@Argument(ArgumentType.REGEX) String valuePattern) {
|
||||||
|
|
||||||
Pattern compiledWithoutPattern = null;
|
Pattern compiledValuePattern = null;
|
||||||
|
|
||||||
if (compiledValuePattern != null) {
|
if (valuePattern != null) {
|
||||||
compiledWithoutPattern = Patterns.getCompiledPattern(compiledValuePattern, patternCaseInsensitive);
|
compiledValuePattern = Patterns.getCompiledPattern(valuePattern, patternCaseInsensitive);
|
||||||
}
|
}
|
||||||
|
|
||||||
Pattern compiledPattern = Patterns.getCompiledPattern(suffixPattern, patternCaseInsensitive);
|
Pattern compiledPattern = Patterns.getCompiledPattern(suffixPattern, patternCaseInsensitive);
|
||||||
@ -204,9 +204,9 @@ public class Section {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (compiledValuePattern != null) {
|
if (valuePattern != null) {
|
||||||
Matcher matcherCompiledValuePattern = compiledWithoutPattern.matcher(entity.getWord());
|
Matcher valueMatcher = compiledValuePattern.matcher(entity.getWord());
|
||||||
if (!matcherCompiledValuePattern.matches()) {
|
if (!valueMatcher.matches()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user