This is an automated email from the ASF dual-hosted git repository. garydgregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-validator.git
commit fc7e60297009b054aa5c797d59a8abdc392ecf8d Author: Gary Gregory <[email protected]> AuthorDate: Sat Jun 13 15:25:35 2026 +0000 Javadoc and comments --- .../commons/validator/routines/RegexValidator.java | 22 +++++++++++----------- .../validator/routines/RegexValidatorTest.java | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/main/java/org/apache/commons/validator/routines/RegexValidator.java b/src/main/java/org/apache/commons/validator/routines/RegexValidator.java index cea2edb4..7153cc4b 100644 --- a/src/main/java/org/apache/commons/validator/routines/RegexValidator.java +++ b/src/main/java/org/apache/commons/validator/routines/RegexValidator.java @@ -25,7 +25,7 @@ import java.util.regex.Pattern; * <strong>Regular Expression</strong> validation (using the JRE's regular expression support). * <p> * Constructs the validator either for a single regular expression or a set (array) of regular expressions. By default, validation is <em>case sensitive</em> but - * constructors are provided to allow <em>case in-sensitive</em> validation. For example to create a validator which does <em>case in-sensitive</em> validation + * constructors are provided to allow <em>case insensitive</em> validation. For example to create a validator which does <em>case insensitive</em> validation * for a set of regular expressions: * </p> * @@ -83,7 +83,7 @@ public class RegexValidator implements Serializable { /** * Constructs a new instance that matches any one of the set of regular expressions with the specified case sensitivity. * - * @param regexs The set of regular expressions this validator will validate against + * @param regexs The set of regular expressions this validator will validate against. * @param flags See flags in {@link Pattern#compile(String, int)}. */ private RegexValidator(final int flags, final String... regexs) { @@ -103,7 +103,7 @@ public class RegexValidator implements Serializable { /** * Constructs a new <em>case sensitive</em> instance that matches any one in the list of regular expressions. * - * @param regexs The set of regular expressions this validator will validate against + * @param regexs The set of regular expressions this validator will validate against. */ RegexValidator(final List<String> regexs) { this(CASE_SENSITIVE, regexs.toArray(new String[] {})); @@ -112,7 +112,7 @@ public class RegexValidator implements Serializable { /** * Constructs a new <em>case sensitive</em> instance for a single regular expression. * - * @param regex The regular expression this validator will validate against + * @param regex The regular expression this validator will validate against. */ public RegexValidator(final String regex) { this(CASE_SENSITIVE, regex); @@ -121,7 +121,7 @@ public class RegexValidator implements Serializable { /** * Constructs a new <em>case sensitive</em> instance that matches any one in the array of regular expressions. * - * @param regexs The set of regular expressions this validator will validate against + * @param regexs The set of regular expressions this validator will validate against. */ public RegexValidator(final String... regexs) { this(CASE_SENSITIVE, regexs); @@ -130,8 +130,8 @@ public class RegexValidator implements Serializable { /** * Constructs a new instance for a single regular expression with the specified case sensitivity. * - * @param regex The regular expression this validator will validate against - * @param caseSensitive when {@code true} matching is <em>case sensitive</em>, otherwise matching is <em>case in-sensitive</em> + * @param regex The regular expression this validator will validate against. + * @param caseSensitive when {@code true} matching is <em>case sensitive</em>, otherwise matching is <em>case insensitive</em>. */ public RegexValidator(final String regex, final boolean caseSensitive) { this(toCompileFlags(caseSensitive), regex); @@ -140,8 +140,8 @@ public class RegexValidator implements Serializable { /** * Constructs a new instance that matches any one of the set of regular expressions with the specified case sensitivity. * - * @param regexs The set of regular expressions this validator will validate against - * @param caseSensitive when {@code true} matching is <em>case sensitive</em>, otherwise matching is <em>case in-sensitive</em> + * @param regexs The set of regular expressions this validator will validate against. + * @param caseSensitive when {@code true} matching is <em>case sensitive</em>, otherwise matching is <em>case insensitive</em>. */ public RegexValidator(final String[] regexs, final boolean caseSensitive) { this(toCompileFlags(caseSensitive), regexs); @@ -179,7 +179,7 @@ public class RegexValidator implements Serializable { * Validates a value against the set of regular expressions returning the array of matched groups. * * @param value The value to validate. - * @return String array of the <em>groups</em> matched if valid or {@code null} if invalid + * @return String array of the <em>groups</em> matched if valid or {@code null} if invalid. */ public String[] match(final String value) { if (value == null) { @@ -222,7 +222,7 @@ public class RegexValidator implements Serializable { * Validates a value against the set of regular expressions returning a String value of the aggregated groups. * * @param value The value to validate. - * @return Aggregated String value comprised of the <em>groups</em> matched if valid or {@code null} if invalid + * @return Aggregated String value comprised of the <em>groups</em> matched if valid or {@code null} if invalid. */ public String validate(final String value) { if (value == null) { diff --git a/src/test/java/org/apache/commons/validator/routines/RegexValidatorTest.java b/src/test/java/org/apache/commons/validator/routines/RegexValidatorTest.java index b7cee44a..dc6b3347 100644 --- a/src/test/java/org/apache/commons/validator/routines/RegexValidatorTest.java +++ b/src/test/java/org/apache/commons/validator/routines/RegexValidatorTest.java @@ -114,11 +114,11 @@ class RegexValidatorTest { } /** - * Test with multiple regular expressions (case in-sensitive). + * Test with multiple regular expressions (case insensitive). */ @Test void testMultipleInsensitive() { - // Set up In-sensitive Validators + // Set up insensitive Validators final RegexValidator multiple = new RegexValidator(MULTIPLE_REGEX, false); final RegexValidator single1 = new RegexValidator(REGEX_1, false); final RegexValidator single2 = new RegexValidator(REGEX_2, false);
