Aleksey Kulikov 2025-05-21 19:11:41 +03:00
parent d5349a6e5e
commit 39fed03c9e

View file

@ -103,9 +103,9 @@ public final class ValidateSymbolsRule<R> implements IValidationRule<ImdgValidat
String forHash = validationSymbols.stream().map(ValidationSymbols::getSymbols).collect(Collectors.joining());
Integer hash = forHash.hashCode();
if (!Objects.equals(allowedSymbolsHash.get(), hash)) {
Set<Character> currAllowedSymbols = new HashSet<>();
for (ValidationSymbols symbols : validationSymbols) {
Matcher matcher = rangePattern.matcher(symbols.getSymbols());
Set<Character> currAllowedSymbols = new HashSet<>();
while (matcher.find()) {
String part = matcher.group();
if (part.length() == 3 && part.charAt(1) == '-') {
@ -122,9 +122,9 @@ public final class ValidateSymbolsRule<R> implements IValidationRule<ImdgValidat
currAllowedSymbols.add(part.charAt(0));
}
}
allowedSymbols.set(currAllowedSymbols);
allowedSymbolsHash.set(hash);
}
allowedSymbols.set(currAllowedSymbols);
allowedSymbolsHash.set(hash);
}
}