This commit is contained in:
AKurakin 2025-05-22 14:39:01 +03:00
parent 39fed03c9e
commit ed4be6d227

View file

@ -103,6 +103,7 @@ public final class ValidateSymbolsRule<R> implements IValidationRule<ImdgValidat
String forHash = validationSymbols.stream().map(ValidationSymbols::getSymbols).collect(Collectors.joining()); String forHash = validationSymbols.stream().map(ValidationSymbols::getSymbols).collect(Collectors.joining());
Integer hash = forHash.hashCode(); Integer hash = forHash.hashCode();
if (!Objects.equals(allowedSymbolsHash.get(), hash)) { if (!Objects.equals(allowedSymbolsHash.get(), hash)) {
log.debug("Compile new ValidationSymbols of \"{}\"", forHash);
Set<Character> currAllowedSymbols = new HashSet<>(); Set<Character> currAllowedSymbols = new HashSet<>();
for (ValidationSymbols symbols : validationSymbols) { for (ValidationSymbols symbols : validationSymbols) {
Matcher matcher = rangePattern.matcher(symbols.getSymbols()); Matcher matcher = rangePattern.matcher(symbols.getSymbols());
@ -123,6 +124,7 @@ public final class ValidateSymbolsRule<R> implements IValidationRule<ImdgValidat
} }
} }
} }
log.trace("Set allowedSymbols={}", currAllowedSymbols);
allowedSymbols.set(currAllowedSymbols); allowedSymbols.set(currAllowedSymbols);
allowedSymbolsHash.set(hash); allowedSymbolsHash.set(hash);
} }