You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publicstaticvoidvalidatePattern(Stringpattern, Stringstring){
if (!string.replaceAll(pattern, "").equals(string)){
thrownewRestrictionViolationException("Violation of pattern restriction, the string doesn't math the acceptable pattern, which is " + pattern);
}
}
It fails in the following scenario:
// ...link().attrSizes("16x16").__()
// ...
It should probably be:
if (!string.replaceAll(pattern, "").equals("")){
There are probably more efficient solutions to check matching, such as:
if (!Pattern.matches(pattern, string)){
doesn't math should be doesn't match
The text was updated successfully, but these errors were encountered:
d6c8
changed the title
RestrictionValidator.validatePattern
RestrictionValidator.validatePattern: invalid matching+ typo
May 17, 2021
This method is defined as:
It fails in the following scenario:
There are probably more efficient solutions to check matching, such as:
The text was updated successfully, but these errors were encountered: