in src/main/java/org/apache/sling/validation/impl/model/ResourcePropertyImpl.java [46:61]
protected ResourcePropertyImpl(@NotNull String name, String nameRegex, boolean isMultiple, boolean isRequired,
@NotNull List<ValidatorInvocation> validators) throws IllegalArgumentException {
if (nameRegex != null) {
try {
this.namePattern = Pattern.compile(nameRegex);
} catch (PatternSyntaxException e) {
throw new IllegalArgumentException("Invalid regex given", e);
}
} else {
this.namePattern = null;
}
this.name = name;
this.isMultiple = isMultiple;
this.isRequired = isRequired;
this.validators = validators;
}