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,
|
||||
@Argument(ArgumentType.BOOLEAN) boolean patternCaseInsensitive,
|
||||
@Argument(ArgumentType.INTEGER) int group,
|
||||
@Argument(ArgumentType.REGEX) String compiledValuePattern) {
|
||||
@Argument(ArgumentType.REGEX) String valuePattern) {
|
||||
|
||||
Pattern compiledWithoutPattern = null;
|
||||
Pattern compiledValuePattern = null;
|
||||
|
||||
if (compiledValuePattern != null) {
|
||||
compiledWithoutPattern = Patterns.getCompiledPattern(compiledValuePattern, patternCaseInsensitive);
|
||||
if (valuePattern != null) {
|
||||
compiledValuePattern = Patterns.getCompiledPattern(valuePattern, patternCaseInsensitive);
|
||||
}
|
||||
|
||||
Pattern compiledPattern = Patterns.getCompiledPattern(suffixPattern, patternCaseInsensitive);
|
||||
@ -204,9 +204,9 @@ public class Section {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (compiledValuePattern != null) {
|
||||
Matcher matcherCompiledValuePattern = compiledWithoutPattern.matcher(entity.getWord());
|
||||
if (!matcherCompiledValuePattern.matches()) {
|
||||
if (valuePattern != null) {
|
||||
Matcher valueMatcher = compiledValuePattern.matcher(entity.getWord());
|
||||
if (!valueMatcher.matches()) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user