This is an automated email from the ASF dual-hosted git repository. ebourg pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-validator.git
commit eba5e863b2aa2d58b2b356280892f3e52f5f509e Author: Emmanuel Bourg <ebo...@apache.org> AuthorDate: Mon Nov 18 10:53:02 2024 +0100 Fixed a few typos --- .../java/org/apache/commons/validator/Arg.java | 2 +- .../java/org/apache/commons/validator/Field.java | 6 ++--- .../org/apache/commons/validator/UrlValidator.java | 4 +-- .../apache/commons/validator/ValidatorAction.java | 8 +++--- .../org/apache/commons/validator/package-info.java | 2 +- .../commons/validator/routines/CodeValidator.java | 4 +-- .../validator/routines/DomainValidator.java | 4 +-- .../commons/validator/routines/UrlValidator.java | 2 +- .../routines/checkdigit/ABANumberCheckDigit.java | 2 +- .../routines/checkdigit/CASNumberCheckDigit.java | 2 +- .../routines/checkdigit/EAN13CheckDigit.java | 2 +- .../routines/checkdigit/ECNumberCheckDigit.java | 2 +- .../routines/checkdigit/ISBN10CheckDigit.java | 2 +- .../routines/checkdigit/ModulusCheckDigit.java | 2 +- .../routines/checkdigit/ModulusTenCheckDigit.java | 26 +++++++++---------- .../routines/checkdigit/SedolCheckDigit.java | 4 +-- .../commons/validator/routines/package-info.java | 8 +++--- .../commons/validator/resources/validator_1_0.dtd | 4 +-- .../validator/resources/validator_1_0_1.dtd | 4 +-- .../commons/validator/resources/validator_1_1.dtd | 4 +-- .../validator/resources/validator_1_1_3.dtd | 2 +- .../validator/resources/validator_1_2_0.dtd | 4 +-- .../validator/resources/validator_1_3_0.dtd | 4 +-- .../validator/resources/validator_1_4_0.dtd | 4 +-- src/site/xdoc/tasks.xml | 2 +- src/site/xdoc/validator_2_0_0_proposal.dtd | 2 +- .../org/apache/commons/validator/DateTest.java | 2 +- .../org/apache/commons/validator/EmailTest.java | 4 +-- .../apache/commons/validator/ExtensionTest.java | 4 +-- .../org/apache/commons/validator/FieldTest.java | 8 +++--- .../org/apache/commons/validator/LocaleTest.java | 2 +- .../org/apache/commons/validator/MultipleTest.java | 2 +- .../apache/commons/validator/RetrieveFormTest.java | 30 +++++++++++----------- .../validator/routines/IBANValidatorTest.java | 2 +- .../validator/routines/PercentValidatorTest.java | 2 +- .../validator/routines/TimeValidatorTest.java | 6 ++--- .../checkdigit/AbstractCheckDigitTest.java | 2 +- .../commons/validator/RetrieveFormTest-config.xml | 2 +- 38 files changed, 89 insertions(+), 89 deletions(-) diff --git a/src/main/java/org/apache/commons/validator/Arg.java b/src/main/java/org/apache/commons/validator/Arg.java index 138a62e9..f57945b0 100644 --- a/src/main/java/org/apache/commons/validator/Arg.java +++ b/src/main/java/org/apache/commons/validator/Arg.java @@ -57,7 +57,7 @@ public class Arg implements Cloneable, Serializable { protected String name; /** - * This argument's position in the message. Set postion=0 to + * This argument's position in the message. Set position=0 to * make a replacement in this string: "some msg {0}". * @since 1.1 */ diff --git a/src/main/java/org/apache/commons/validator/Field.java b/src/main/java/org/apache/commons/validator/Field.java index a6d1db2f..cf807a29 100644 --- a/src/main/java/org/apache/commons/validator/Field.java +++ b/src/main/java/org/apache/commons/validator/Field.java @@ -71,7 +71,7 @@ public class Field implements Cloneable, Serializable { protected static final String TOKEN_END = "}"; /** - * A Vriable token. + * A Variable token. */ protected static final String TOKEN_VAR = "var:"; @@ -236,7 +236,7 @@ public class Field implements Cloneable, Serializable { final int position = arg.getPosition(); - // position has been explicity set + // position has been explicitly set if (position >= 0) { return; } @@ -353,7 +353,7 @@ public class Field implements Cloneable, Serializable { /** * Gets an unmodifiable {@code List} of the dependencies in the same * order they were defined in parameter passed to the setDepends() method. - * @return A list of the Field's dependancies. + * @return A list of the Field's dependencies. */ public List<String> getDependencyList() { return Collections.unmodifiableList(dependencyList); diff --git a/src/main/java/org/apache/commons/validator/UrlValidator.java b/src/main/java/org/apache/commons/validator/UrlValidator.java index 21784576..483c9bc4 100644 --- a/src/main/java/org/apache/commons/validator/UrlValidator.java +++ b/src/main/java/org/apache/commons/validator/UrlValidator.java @@ -28,7 +28,7 @@ import org.apache.commons.validator.util.Flags; /** * <p>Validates URLs.</p> - * Behavour of validation is modified by passing in options: + * Behaviour of validation is modified by passing in options: * <ul> * <li>ALLOW_2_SLASHES - [FALSE] Allows double '/' characters in the path * component.</li> @@ -212,7 +212,7 @@ public class UrlValidator implements Serializable { } /** - * Behavour of validation is modified by passing in options: + * Behaviour of validation is modified by passing in options: * @param schemes The set of valid schemes. * @param options The options should be set using the public constants declared in * this class. To set multiple options you simply add them together. For example, diff --git a/src/main/java/org/apache/commons/validator/ValidatorAction.java b/src/main/java/org/apache/commons/validator/ValidatorAction.java index 1dcf6c7a..315499fd 100644 --- a/src/main/java/org/apache/commons/validator/ValidatorAction.java +++ b/src/main/java/org/apache/commons/validator/ValidatorAction.java @@ -94,7 +94,7 @@ public class ValidatorAction implements Serializable { /** * The other {@code ValidatorAction}s that this one depends on. If any errors occur in an action that this one depends on, this action will not be - * processsed. + * processed. */ private String depends; @@ -114,7 +114,7 @@ public class ValidatorAction implements Serializable { private String jsFunction; /** - * An optional field to containing a JavaScript representation of the Java method assocated with this action. + * An optional field to containing a JavaScript representation of the Java method associated with this action. */ private String javascript; @@ -254,7 +254,7 @@ public class ValidatorAction implements Serializable { /** * Returns the dependent validator names as an unmodifiable {@code List}. * - * @return List of the validator action's depedents. + * @return List of the validator action's dependents. */ public List<String> getDependencyList() { return Collections.unmodifiableList(dependencyList); @@ -445,7 +445,7 @@ public class ValidatorAction implements Serializable { * Load the JavaScript function specified by the given path. For this implementation, the {@code jsFunction} property should contain a fully qualified * package and script name, separated by periods, to be loaded from the class loader that created this instance. * - * TODO if the path begins with a '/' the path will be intepreted as absolute, and remain unchanged. If this fails then it will attempt to treat the path as + * TODO if the path begins with a '/' the path will be interpreted as absolute, and remain unchanged. If this fails then it will attempt to treat the path as * a file path. It is assumed the script ends with a '.js'. */ protected synchronized void loadJavascriptFunction() { diff --git a/src/main/java/org/apache/commons/validator/package-info.java b/src/main/java/org/apache/commons/validator/package-info.java index 49fff7d2..3778d34e 100644 --- a/src/main/java/org/apache/commons/validator/package-info.java +++ b/src/main/java/org/apache/commons/validator/package-info.java @@ -82,7 +82,7 @@ * <caption>Reserved Parameters</caption> * <tr> * <th>Class Name</th> - * <th>Validator Contstant</th> + * <th>Validator Constant</th> * <th>Description</th> * </tr> * <tr> diff --git a/src/main/java/org/apache/commons/validator/routines/CodeValidator.java b/src/main/java/org/apache/commons/validator/routines/CodeValidator.java index adac0e35..d07beb90 100644 --- a/src/main/java/org/apache/commons/validator/routines/CodeValidator.java +++ b/src/main/java/org/apache/commons/validator/routines/CodeValidator.java @@ -100,7 +100,7 @@ public final class CodeValidator implements Serializable { * * @param regexValidator The format regular expression validator * @param length The length of the code - * (sets the mimimum/maximum to the same value) + * (sets the minimum/maximum to the same value) * @param checkdigit The check digit validation routine */ public CodeValidator(final RegexValidator regexValidator, final int length, final CheckDigit checkdigit) { @@ -143,7 +143,7 @@ public final class CodeValidator implements Serializable { * * @param regex The format regular expression. * @param length The length of the code - * (sets the mimimum/maximum to the same) + * (sets the minimum/maximum to the same) * @param checkdigit The check digit validation routine */ public CodeValidator(final String regex, final int length, final CheckDigit checkdigit) { diff --git a/src/main/java/org/apache/commons/validator/routines/DomainValidator.java b/src/main/java/org/apache/commons/validator/routines/DomainValidator.java index a9b0d986..1bb7b8a1 100644 --- a/src/main/java/org/apache/commons/validator/routines/DomainValidator.java +++ b/src/main/java/org/apache/commons/validator/routines/DomainValidator.java @@ -70,11 +70,11 @@ public class DomainValidator implements Serializable { * @since 1.5.1 made public and added read-only array references */ public enum ArrayType { - /** Update (or get a copy of) the GENERIC_TLDS_PLUS table containing additonal generic TLDs */ + /** Update (or get a copy of) the GENERIC_TLDS_PLUS table containing additional generic TLDs */ GENERIC_PLUS, /** Update (or get a copy of) the GENERIC_TLDS_MINUS table containing deleted generic TLDs */ GENERIC_MINUS, - /** Update (or get a copy of) the COUNTRY_CODE_TLDS_PLUS table containing additonal country code TLDs */ + /** Update (or get a copy of) the COUNTRY_CODE_TLDS_PLUS table containing additional country code TLDs */ COUNTRY_CODE_PLUS, /** Update (or get a copy of) the COUNTRY_CODE_TLDS_MINUS table containing deleted country code TLDs */ COUNTRY_CODE_MINUS, diff --git a/src/main/java/org/apache/commons/validator/routines/UrlValidator.java b/src/main/java/org/apache/commons/validator/routines/UrlValidator.java index c0f35f90..347bf663 100644 --- a/src/main/java/org/apache/commons/validator/routines/UrlValidator.java +++ b/src/main/java/org/apache/commons/validator/routines/UrlValidator.java @@ -410,7 +410,7 @@ public class UrlValidator implements Serializable { * If a RegexValidator was supplied and it matches, then the authority is regarded * as valid with no further checks, otherwise the method checks against the * AUTHORITY_PATTERN and the DomainValidator (ALLOW_LOCAL_URLS) - * @param authority Authority value to validate, alllows IDN + * @param authority Authority value to validate, allows IDN * @return true if authority (hostname and port) is valid. */ protected boolean isValidAuthority(final String authority) { diff --git a/src/main/java/org/apache/commons/validator/routines/checkdigit/ABANumberCheckDigit.java b/src/main/java/org/apache/commons/validator/routines/checkdigit/ABANumberCheckDigit.java index 42853b09..18d5e1c9 100644 --- a/src/main/java/org/apache/commons/validator/routines/checkdigit/ABANumberCheckDigit.java +++ b/src/main/java/org/apache/commons/validator/routines/checkdigit/ABANumberCheckDigit.java @@ -71,7 +71,7 @@ public final class ABANumberCheckDigit extends ModulusCheckDigit { * * @param charValue The numeric value of the character. * @param leftPos The position of the character in the code, counting from left to right - * @param rightPos The positionof the character in the code, counting from right to left + * @param rightPos The position of the character in the code, counting from right to left * @return The weighted value of the character. */ @Override diff --git a/src/main/java/org/apache/commons/validator/routines/checkdigit/CASNumberCheckDigit.java b/src/main/java/org/apache/commons/validator/routines/checkdigit/CASNumberCheckDigit.java index 6f0e68dc..a840b20a 100644 --- a/src/main/java/org/apache/commons/validator/routines/checkdigit/CASNumberCheckDigit.java +++ b/src/main/java/org/apache/commons/validator/routines/checkdigit/CASNumberCheckDigit.java @@ -129,7 +129,7 @@ public final class CASNumberCheckDigit extends ModulusCheckDigit { * * @param charValue The numeric value of the character. * @param leftPos The position of the character in the code, counting from left to right - * @param rightPos The positionof the character in the code, counting from right to left + * @param rightPos The position of the character in the code, counting from right to left * @return The weighted value of the character. */ @Override diff --git a/src/main/java/org/apache/commons/validator/routines/checkdigit/EAN13CheckDigit.java b/src/main/java/org/apache/commons/validator/routines/checkdigit/EAN13CheckDigit.java index 8092a8d2..b55a60d8 100644 --- a/src/main/java/org/apache/commons/validator/routines/checkdigit/EAN13CheckDigit.java +++ b/src/main/java/org/apache/commons/validator/routines/checkdigit/EAN13CheckDigit.java @@ -65,7 +65,7 @@ public final class EAN13CheckDigit extends ModulusCheckDigit { * * @param charValue The numeric value of the character. * @param leftPos The position of the character in the code, counting from left to right - * @param rightPos The positionof the character in the code, counting from right to left + * @param rightPos The position of the character in the code, counting from right to left * @return The weighted value of the character. */ @Override diff --git a/src/main/java/org/apache/commons/validator/routines/checkdigit/ECNumberCheckDigit.java b/src/main/java/org/apache/commons/validator/routines/checkdigit/ECNumberCheckDigit.java index 653e7bf5..0835c8e1 100644 --- a/src/main/java/org/apache/commons/validator/routines/checkdigit/ECNumberCheckDigit.java +++ b/src/main/java/org/apache/commons/validator/routines/checkdigit/ECNumberCheckDigit.java @@ -113,7 +113,7 @@ public final class ECNumberCheckDigit extends ModulusCheckDigit { * * @param charValue The numeric value of the character. * @param leftPos The position of the character in the code, counting from left to right - * @param rightPos The positionof the character in the code, counting from right to left + * @param rightPos The position of the character in the code, counting from right to left * @return The weighted value of the character. */ @Override diff --git a/src/main/java/org/apache/commons/validator/routines/checkdigit/ISBN10CheckDigit.java b/src/main/java/org/apache/commons/validator/routines/checkdigit/ISBN10CheckDigit.java index 13cb95fc..b590e4ef 100644 --- a/src/main/java/org/apache/commons/validator/routines/checkdigit/ISBN10CheckDigit.java +++ b/src/main/java/org/apache/commons/validator/routines/checkdigit/ISBN10CheckDigit.java @@ -103,7 +103,7 @@ public final class ISBN10CheckDigit extends ModulusCheckDigit { * * @param charValue The numeric value of the character. * @param leftPos The position of the character in the code, counting from left to right - * @param rightPos The positionof the character in the code, counting from right to left + * @param rightPos The position of the character in the code, counting from right to left * @return The weighted value of the character. */ @Override diff --git a/src/main/java/org/apache/commons/validator/routines/checkdigit/ModulusCheckDigit.java b/src/main/java/org/apache/commons/validator/routines/checkdigit/ModulusCheckDigit.java index 41339cea..f109694d 100644 --- a/src/main/java/org/apache/commons/validator/routines/checkdigit/ModulusCheckDigit.java +++ b/src/main/java/org/apache/commons/validator/routines/checkdigit/ModulusCheckDigit.java @@ -197,7 +197,7 @@ public abstract class ModulusCheckDigit extends AbstractCheckDigit implements Se * * @param charValue The numeric value of the character * @param leftPos The position of the character in the code, counting from left to right - * @param rightPos The positionof the character in the code, counting from right to left + * @param rightPos The position of the character in the code, counting from right to left * @return The weighted value of the character * @throws CheckDigitException if an error occurs calculating * the weighted value diff --git a/src/main/java/org/apache/commons/validator/routines/checkdigit/ModulusTenCheckDigit.java b/src/main/java/org/apache/commons/validator/routines/checkdigit/ModulusTenCheckDigit.java index 1632f030..414f45b2 100644 --- a/src/main/java/org/apache/commons/validator/routines/checkdigit/ModulusTenCheckDigit.java +++ b/src/main/java/org/apache/commons/validator/routines/checkdigit/ModulusTenCheckDigit.java @@ -34,7 +34,7 @@ import org.apache.commons.validator.routines.CodeValidator; * that method are invalid.</li> * <li>Calculating a <em>weighted value</em> by multiplying the character's * integer value by a <em>weighting factor</em>. The <em>weighting factor</em> is - * selected from the configured {@code postitionWeight} array based on its + * selected from the configured {@code positionWeight} array based on its * position. The {@code postitionWeight} values are used either * left-to-right (when {@code useRightPos=false}) or right-to-left (when * {@code useRightPos=true}).</li> @@ -118,7 +118,7 @@ public final class ModulusTenCheckDigit extends ModulusCheckDigit { /** * The weighted values to apply based on the character position */ - private final int[] postitionWeight; + private final int[] positionWeight; /** * {@code true} if use positionWeights from right to left @@ -134,24 +134,24 @@ public final class ModulusTenCheckDigit extends ModulusCheckDigit { * Constructs a modulus 10 Check Digit routine with the specified weighting * from left to right. * - * @param postitionWeight the weighted values to apply based on the + * @param positionWeight the weighted values to apply based on the * character position */ - public ModulusTenCheckDigit(final int[] postitionWeight) { - this(postitionWeight, false, false); + public ModulusTenCheckDigit(final int[] positionWeight) { + this(positionWeight, false, false); } /** * Constructs a modulus 10 Check Digit routine with the specified weighting, * indicating whether its from the left or right. * - * @param postitionWeight the weighted values to apply based on the + * @param positionWeight the weighted values to apply based on the * character position * @param useRightPos {@code true} if use positionWeights from right to * left */ - public ModulusTenCheckDigit(final int[] postitionWeight, final boolean useRightPos) { - this(postitionWeight, useRightPos, false); + public ModulusTenCheckDigit(final int[] positionWeight, final boolean useRightPos) { + this(positionWeight, useRightPos, false); } /** @@ -159,15 +159,15 @@ public final class ModulusTenCheckDigit extends ModulusCheckDigit { * indicating whether its from the left or right and whether the weighted * digits should be summed. * - * @param postitionWeight the weighted values to apply based on the + * @param positionWeight the weighted values to apply based on the * character position * @param useRightPos {@code true} if use positionWeights from right to * left * @param sumWeightedDigits {@code true} if sum the digits of the * weighted value */ - public ModulusTenCheckDigit(final int[] postitionWeight, final boolean useRightPos, final boolean sumWeightedDigits) { - this.postitionWeight = Arrays.copyOf(postitionWeight, postitionWeight.length); + public ModulusTenCheckDigit(final int[] positionWeight, final boolean useRightPos, final boolean sumWeightedDigits) { + this.positionWeight = Arrays.copyOf(positionWeight, positionWeight.length); this.useRightPos = useRightPos; this.sumWeightedDigits = sumWeightedDigits; } @@ -223,7 +223,7 @@ public final class ModulusTenCheckDigit extends ModulusCheckDigit { */ @Override public String toString() { - return getClass().getSimpleName() + "[postitionWeight=" + Arrays.toString(postitionWeight) + ", useRightPos=" + return getClass().getSimpleName() + "[positionWeight=" + Arrays.toString(positionWeight) + ", useRightPos=" + useRightPos + ", sumWeightedDigits=" + sumWeightedDigits + "]"; } @@ -241,7 +241,7 @@ public final class ModulusTenCheckDigit extends ModulusCheckDigit { @Override protected int weightedValue(final int charValue, final int leftPos, final int rightPos) { final int pos = useRightPos ? rightPos : leftPos; - final int weight = postitionWeight[(pos - 1) % postitionWeight.length]; + final int weight = positionWeight[(pos - 1) % positionWeight.length]; int weightedValue = charValue * weight; if (sumWeightedDigits) { weightedValue = sumDigits(weightedValue); diff --git a/src/main/java/org/apache/commons/validator/routines/checkdigit/SedolCheckDigit.java b/src/main/java/org/apache/commons/validator/routines/checkdigit/SedolCheckDigit.java index 3ebc69cc..f6bd36a5 100644 --- a/src/main/java/org/apache/commons/validator/routines/checkdigit/SedolCheckDigit.java +++ b/src/main/java/org/apache/commons/validator/routines/checkdigit/SedolCheckDigit.java @@ -78,7 +78,7 @@ public final class SedolCheckDigit extends ModulusCheckDigit { * * @param character The character to convert * @param leftPos The position of the character in the code, counting from left to right - * @param rightPos The positionof the character in the code, counting from right to left + * @param rightPos The position of the character in the code, counting from right to left * @return The integer value of the character * @throws CheckDigitException if character is not alphanumeric */ @@ -99,7 +99,7 @@ public final class SedolCheckDigit extends ModulusCheckDigit { * * @param charValue The numeric value of the character. * @param leftPos The position of the character in the code, counting from left to right - * @param rightPos The positionof the character in the code, counting from right to left + * @param rightPos The position of the character in the code, counting from right to left * @return The weighted value of the character. */ @Override diff --git a/src/main/java/org/apache/commons/validator/routines/package-info.java b/src/main/java/org/apache/commons/validator/routines/package-info.java index 6b6dea47..c5d4ff11 100644 --- a/src/main/java/org/apache/commons/validator/routines/package-info.java +++ b/src/main/java/org/apache/commons/validator/routines/package-info.java @@ -402,11 +402,11 @@ * <h2>4.2 Regular Expression Validation</h2> * <p> * Regular expression validation can be done either by using the <em>static</em> - * methods provied by <a href="RegexValidator.html">RegexValidator</a> or + * methods provided by <a href="RegexValidator.html">RegexValidator</a> or * by creating a new instance, which caches and re-uses compiled Patterns. * </p> * <ul> - * <li><strong>Method Flavours</strong> - three <em>flavors</em> of validation metods are provided:</li> + * <li><strong>Method Flavours</strong> - three <em>flavors</em> of validation methods are provided:</li> * <li> * <ul> * <li>{@code isValid()} methods return true/false to indicate @@ -481,7 +481,7 @@ * <ul> * <li>{@code isValid(<em>code</em>)} - validates the check digit of a code, * returning {@code true} or {@code false}.</li> - * <li>{@code calculate(<em>code</em>)} - calulates the check digit for a code + * <li>{@code calculate(<em>code</em>)} - calculates the check digit for a code * returning the check digit character.</li> * </ul> * <p> @@ -527,7 +527,7 @@ * boolean valid = ISBNCheckDigit.ISBN.isValid(code); * </pre> * <p> - * The following examples show calulating the check digit of a code: + * The following examples show calculating the check digit of a code: * </p> * <pre> * // Luhn check digit validation diff --git a/src/main/resources/org/apache/commons/validator/resources/validator_1_0.dtd b/src/main/resources/org/apache/commons/validator/resources/validator_1_0.dtd index b8057516..0d2654e3 100644 --- a/src/main/resources/org/apache/commons/validator/resources/validator_1_0.dtd +++ b/src/main/resources/org/apache/commons/validator/resources/validator_1_0.dtd @@ -93,7 +93,7 @@ <!-- The "form" element defines a set of fields to be validated. The name - corresponds to the identifer the application assigns to the form. + corresponds to the identifier the application assigns to the form. --> <!ELEMENT form (field+ )> <!ATTLIST form name CDATA #REQUIRED> @@ -138,7 +138,7 @@ <!-- The "msg" element defines a custom message key to use when one of the validators for this field fails. Each validator has a default message - property that is used when a corresonding field msg is not specified. + property that is used when a corresponding field msg is not specified. Each validator applied to a field may have its own msg element. The msg element accepts up to three attributes. diff --git a/src/main/resources/org/apache/commons/validator/resources/validator_1_0_1.dtd b/src/main/resources/org/apache/commons/validator/resources/validator_1_0_1.dtd index ea1b39e8..23e152a6 100644 --- a/src/main/resources/org/apache/commons/validator/resources/validator_1_0_1.dtd +++ b/src/main/resources/org/apache/commons/validator/resources/validator_1_0_1.dtd @@ -92,7 +92,7 @@ <!-- The "form" element defines a set of fields to be validated. The name - corresponds to the identifer the application assigns to the form. + corresponds to the identifier the application assigns to the form. --> <!ELEMENT form (field+ )> <!ATTLIST form name CDATA #REQUIRED> @@ -137,7 +137,7 @@ <!-- The "msg" element defines a custom message key to use when one of the validators for this field fails. Each validator has a default message - property that is used when a corresonding field msg is not specified. + property that is used when a corresponding field msg is not specified. Each validator applied to a field may have its own msg element. The msg element accepts up to three attributes. diff --git a/src/main/resources/org/apache/commons/validator/resources/validator_1_1.dtd b/src/main/resources/org/apache/commons/validator/resources/validator_1_1.dtd index b015b381..2911af26 100644 --- a/src/main/resources/org/apache/commons/validator/resources/validator_1_1.dtd +++ b/src/main/resources/org/apache/commons/validator/resources/validator_1_1.dtd @@ -91,7 +91,7 @@ <!-- The "form" element defines a set of fields to be validated. The name - corresponds to the identifer the application assigns to the form. + corresponds to the identifier the application assigns to the form. --> <!ELEMENT form (field+)> <!ATTLIST form name CDATA #REQUIRED> @@ -136,7 +136,7 @@ <!-- The "msg" element defines a custom message key to use when one of the validators for this field fails. Each validator has a default message - property that is used when a corresonding field msg is not specified. + property that is used when a corresponding field msg is not specified. Each validator applied to a field may have its own msg element. The msg element accepts these attributes. diff --git a/src/main/resources/org/apache/commons/validator/resources/validator_1_1_3.dtd b/src/main/resources/org/apache/commons/validator/resources/validator_1_1_3.dtd index f7306d55..37399b78 100644 --- a/src/main/resources/org/apache/commons/validator/resources/validator_1_1_3.dtd +++ b/src/main/resources/org/apache/commons/validator/resources/validator_1_1_3.dtd @@ -48,7 +48,7 @@ The "validator" element defines what validator objects can be used with the fields referenced by the formset elements. elements: - validator Defines a new validatior + validator Defines a new validator javascript The javascript source code for client side validation. attributes: name The name of this validation diff --git a/src/main/resources/org/apache/commons/validator/resources/validator_1_2_0.dtd b/src/main/resources/org/apache/commons/validator/resources/validator_1_2_0.dtd index a74bd4ad..1f5379d1 100644 --- a/src/main/resources/org/apache/commons/validator/resources/validator_1_2_0.dtd +++ b/src/main/resources/org/apache/commons/validator/resources/validator_1_2_0.dtd @@ -48,7 +48,7 @@ Defines what validator objects can be used with the fields referenced by the formset elements. elements: - validator Defines a new validatior + validator Defines a new validator javascript The javascript source code for client side validation. attributes: name The name of this validation @@ -201,7 +201,7 @@ N.B. Since 1.2.0 position is ignored for 'default' arguments (i.e. those with no 'name' supplied) - it is calculated automatically from the order the arguments are added in. - For 'overriden' arguments (i.e. those with a 'name') + For 'overridden' arguments (i.e. those with a 'name') it is optional. If 'position' is not supplied it will use the position of the 'default' argument it follows. --> diff --git a/src/main/resources/org/apache/commons/validator/resources/validator_1_3_0.dtd b/src/main/resources/org/apache/commons/validator/resources/validator_1_3_0.dtd index 4fdac867..03369fd3 100644 --- a/src/main/resources/org/apache/commons/validator/resources/validator_1_3_0.dtd +++ b/src/main/resources/org/apache/commons/validator/resources/validator_1_3_0.dtd @@ -48,7 +48,7 @@ Defines what validator objects can be used with the fields referenced by the formset elements. elements: - validator Defines a new validatior + validator Defines a new validator javascript The javascript source code for client side validation. attributes: name The name of this validation @@ -201,7 +201,7 @@ N.B. Since 1.2.0 position is ignored for 'default' arguments (i.e. those with no 'name' supplied) - it is calculated automatically from the order the arguments are added in. - For 'overriden' arguments (i.e. those with a 'name') + For 'overridden' arguments (i.e. those with a 'name') it is optional. If 'position' is not supplied it will use the position of the 'default' argument it follows. --> diff --git a/src/main/resources/org/apache/commons/validator/resources/validator_1_4_0.dtd b/src/main/resources/org/apache/commons/validator/resources/validator_1_4_0.dtd index 94855e2c..1fc7afe4 100644 --- a/src/main/resources/org/apache/commons/validator/resources/validator_1_4_0.dtd +++ b/src/main/resources/org/apache/commons/validator/resources/validator_1_4_0.dtd @@ -48,7 +48,7 @@ Defines what validator objects can be used with the fields referenced by the formset elements. elements: - validator Defines a new validatior + validator Defines a new validator javascript The javascript source code for client side validation. attributes: name The name of this validation @@ -205,7 +205,7 @@ N.B. Since 1.2.0 position is ignored for 'default' arguments (i.e. those with no 'name' supplied) - it is calculated automatically from the order the arguments are added in. - For 'overriden' arguments (i.e. those with a 'name') + For 'overridden' arguments (i.e. those with a 'name') it is optional. If 'position' is not supplied it will use the position of the 'default' argument it follows. --> diff --git a/src/site/xdoc/tasks.xml b/src/site/xdoc/tasks.xml index c3737121..b3740320 100644 --- a/src/site/xdoc/tasks.xml +++ b/src/site/xdoc/tasks.xml @@ -48,7 +48,7 @@ ValidatorException is only thrown to indicate configuration and programmer errors yet is a checked exception. ValidatorException should be converted to a RuntimeException to match its real purpose. Furthermore, the exception handling for pluggable validations (ValidatorActions) - is not well defined or documented. RuntimeExceptions thrown from ValidatorActions should be propogated + is not well defined or documented. RuntimeExceptions thrown from ValidatorActions should be propagated out of the Validator framework as is because they indicate programmer error. Checked exceptions thrown from a ValidatorAction should stop validation and be propogated out of the framework for handling as these indicate an unrecoverable system failure. Validation method implementation becomes easier because they diff --git a/src/site/xdoc/validator_2_0_0_proposal.dtd b/src/site/xdoc/validator_2_0_0_proposal.dtd index 866e8126..aa71d986 100644 --- a/src/site/xdoc/validator_2_0_0_proposal.dtd +++ b/src/site/xdoc/validator_2_0_0_proposal.dtd @@ -79,7 +79,7 @@ applies to. Defines what validator objects can be used with the objects referenced by the bean-set elements. elements: - validator Defines a new validatior + validator Defines a new validator script The scripting source code for client side validation. attributes: id The unique name of this validation diff --git a/src/test/java/org/apache/commons/validator/DateTest.java b/src/test/java/org/apache/commons/validator/DateTest.java index 892f9d60..c7db41d4 100644 --- a/src/test/java/org/apache/commons/validator/DateTest.java +++ b/src/test/java/org/apache/commons/validator/DateTest.java @@ -73,7 +73,7 @@ public class DateTest extends AbstractCommonTest { } /** - * Utlity class to run a test on a value. + * Utility class to run a test on a value. * * @param info Value to run test on. * @param passed Whether or not the test is expected to pass. diff --git a/src/test/java/org/apache/commons/validator/EmailTest.java b/src/test/java/org/apache/commons/validator/EmailTest.java index b50dd57d..39a78230 100644 --- a/src/test/java/org/apache/commons/validator/EmailTest.java +++ b/src/test/java/org/apache/commons/validator/EmailTest.java @@ -262,7 +262,7 @@ public class EmailTest extends AbstractCommonTest { } /** - * Tests the e-mail validation with an RCS-noncompliant character in the address. + * Tests the e-mail validation with an RCS-non-compliant character in the address. */ @Test public void testEmailWithBogusCharacter() throws ValidatorException { @@ -382,7 +382,7 @@ public class EmailTest extends AbstractCommonTest { } /** - * Utlity class to run a test on a value. + * Utility class to run a test on a value. * * @param info Value to run test on. * @param passed Whether or not the test is expected to pass. diff --git a/src/test/java/org/apache/commons/validator/ExtensionTest.java b/src/test/java/org/apache/commons/validator/ExtensionTest.java index 6c33a770..9259d98a 100644 --- a/src/test/java/org/apache/commons/validator/ExtensionTest.java +++ b/src/test/java/org/apache/commons/validator/ExtensionTest.java @@ -30,7 +30,7 @@ import org.junit.jupiter.api.Test; /** * <p> * Performs tests for extension in form definitions. Performs the same tests RequiredNameTest does but with an equivalent validation definition with extension - * definitions (validator-extension.xml), plus an extra check on overriding rules and another one checking it mantains correct order when extending. + * definitions (validator-extension.xml), plus an extra check on overriding rules and another one checking it maintains correct order when extending. * </p> */ public class ExtensionTest { @@ -76,7 +76,7 @@ public class ExtensionTest { } /** - * Tests if the order is mantained when extending a form. Parent form fields should preceed self form fields, except if we override the rules. + * Tests if the order is maintained when extending a form. Parent form fields should preceed self form fields, except if we override the rules. */ @Test public void testOrder() { diff --git a/src/test/java/org/apache/commons/validator/FieldTest.java b/src/test/java/org/apache/commons/validator/FieldTest.java index 68c0136e..b26bcf4b 100644 --- a/src/test/java/org/apache/commons/validator/FieldTest.java +++ b/src/test/java/org/apache/commons/validator/FieldTest.java @@ -164,7 +164,7 @@ public class FieldTest { } /** - * test Field with a 'default' argument overriden without positions specified. + * test Field with a 'default' argument overridden without positions specified. */ @Test public void testOverridePositionImplied() { @@ -194,7 +194,7 @@ public class FieldTest { } /** - * test Field with a 'default' argument overriden with some positions specified + * test Field with a 'default' argument overridden with some positions specified */ @Test public void testOverrideSomePosition() { @@ -229,7 +229,7 @@ public class FieldTest { } /** - * test Field with a 'default' argument overriden using 'position' property + * test Field with a 'default' argument overridden using 'position' property */ @Test public void testOverrideUsingPositionA() { @@ -253,7 +253,7 @@ public class FieldTest { } /** - * test Field with a 'default' argument overriden using 'position' property + * test Field with a 'default' argument overridden using 'position' property */ @Test public void testOverrideUsingPositionB() { diff --git a/src/test/java/org/apache/commons/validator/LocaleTest.java b/src/test/java/org/apache/commons/validator/LocaleTest.java index 11ef9863..be58d860 100644 --- a/src/test/java/org/apache/commons/validator/LocaleTest.java +++ b/src/test/java/org/apache/commons/validator/LocaleTest.java @@ -134,7 +134,7 @@ public class LocaleTest extends AbstractCommonTest { } /** - * Utlity class to run a test on a value. + * Utility class to run a test on a value. * * @param name param * @param loc param diff --git a/src/test/java/org/apache/commons/validator/MultipleTest.java b/src/test/java/org/apache/commons/validator/MultipleTest.java index 96c2e8f7..dde5f237 100644 --- a/src/test/java/org/apache/commons/validator/MultipleTest.java +++ b/src/test/java/org/apache/commons/validator/MultipleTest.java @@ -199,7 +199,7 @@ public class MultipleTest extends AbstractCommonTest { } /** - * If middle name is there and a positve int, then the required and int dependent tests should pass, and the positive test should pass. + * If middle name is there and a positive int, then the required and int dependent tests should pass, and the positive test should pass. * * @throws ValidatorException */ diff --git a/src/test/java/org/apache/commons/validator/RetrieveFormTest.java b/src/test/java/org/apache/commons/validator/RetrieveFormTest.java index 0d7c19c1..dbc91104 100644 --- a/src/test/java/org/apache/commons/validator/RetrieveFormTest.java +++ b/src/test/java/org/apache/commons/validator/RetrieveFormTest.java @@ -99,13 +99,13 @@ public class RetrieveFormTest { // *** France locale *** checkForm(Locale.FRANCE, formKey, "default"); - // *** Candian (English) locale *** + // *** Canadian (English) locale *** checkForm(Locale.CANADA, formKey, "default"); - // *** Candian French locale *** + // *** Canadian French locale *** checkForm(Locale.CANADA_FRENCH, formKey, "default"); - // *** Candian French Variant locale *** + // *** Canadian French Variant locale *** checkForm(CANADA_FRENCH_XXX, formKey, "default"); } @@ -127,13 +127,13 @@ public class RetrieveFormTest { // *** France locale *** checkFormNotFound(Locale.FRANCE, formKey); - // *** Candian (English) locale *** + // *** Canadian (English) locale *** checkFormNotFound(Locale.CANADA, formKey); - // *** Candian French locale *** + // *** Canadian French locale *** checkFormNotFound(Locale.CANADA_FRENCH, formKey); - // *** Candian French Variant locale *** + // *** Canadian French Variant locale *** checkFormNotFound(CANADA_FRENCH_XXX, formKey); } @@ -155,13 +155,13 @@ public class RetrieveFormTest { // *** France locale *** checkForm(Locale.FRANCE, formKey, "fr_FR"); - // *** Candian (English) locale *** + // *** Canadian (English) locale *** checkForm(Locale.CANADA, formKey, "default"); - // *** Candian French locale *** + // *** Canadian French locale *** checkForm(Locale.CANADA_FRENCH, formKey, "fr_CA"); - // *** Candian French Variant locale *** + // *** Canadian French Variant locale *** checkForm(CANADA_FRENCH_XXX, formKey, "fr_CA"); } @@ -183,13 +183,13 @@ public class RetrieveFormTest { // *** France locale *** checkForm(Locale.FRANCE, formKey, "fr_FR"); - // *** Candian (English) locale *** + // *** Canadian (English) locale *** checkForm(Locale.CANADA, formKey, "default"); - // *** Candian French locale *** + // *** Canadian French locale *** checkForm(Locale.CANADA_FRENCH, formKey, "fr_CA"); - // *** Candian French Variant locale *** + // *** Canadian French Variant locale *** checkForm(CANADA_FRENCH_XXX, formKey, "fr_CA_XXX"); } @@ -211,13 +211,13 @@ public class RetrieveFormTest { // *** France locale *** checkForm(Locale.FRANCE, formKey, "fr"); - // *** Candian (English) locale *** + // *** Canadian (English) locale *** checkForm(Locale.CANADA, formKey, "default"); - // *** Candian French locale *** + // *** Canadian French locale *** checkForm(Locale.CANADA_FRENCH, formKey, "fr"); - // *** Candian French Variant locale *** + // *** Canadian French Variant locale *** checkForm(CANADA_FRENCH_XXX, formKey, "fr"); } diff --git a/src/test/java/org/apache/commons/validator/routines/IBANValidatorTest.java b/src/test/java/org/apache/commons/validator/routines/IBANValidatorTest.java index 79124cba..c73d80f3 100644 --- a/src/test/java/org/apache/commons/validator/routines/IBANValidatorTest.java +++ b/src/test/java/org/apache/commons/validator/routines/IBANValidatorTest.java @@ -326,7 +326,7 @@ public class IBANValidatorTest { } @Test - public void testGetRegexValidatortPatterns() { + public void testGetRegexValidatorPatterns() { assertNotNull(VALIDATOR.getValidator("GB").getRegexValidator().getPatterns(), "GB"); } diff --git a/src/test/java/org/apache/commons/validator/routines/PercentValidatorTest.java b/src/test/java/org/apache/commons/validator/routines/PercentValidatorTest.java index 75248811..dea752f5 100644 --- a/src/test/java/org/apache/commons/validator/routines/PercentValidatorTest.java +++ b/src/test/java/org/apache/commons/validator/routines/PercentValidatorTest.java @@ -93,7 +93,7 @@ public class PercentValidatorTest { final BigDecimal hundred = new BigDecimal("1.00"); assertEquals(expected, validator.validate("12%"), "Default locale"); - assertEquals(negative, validator.validate("-12%"), "Default negtve"); + assertEquals(negative, validator.validate("-12%"), "Default negative"); // Invalid UK assertEquals(expected, validator.validate("12%", Locale.UK), "UK locale"); diff --git a/src/test/java/org/apache/commons/validator/routines/TimeValidatorTest.java b/src/test/java/org/apache/commons/validator/routines/TimeValidatorTest.java index 6360f542..72747901 100644 --- a/src/test/java/org/apache/commons/validator/routines/TimeValidatorTest.java +++ b/src/test/java/org/apache/commons/validator/routines/TimeValidatorTest.java @@ -151,9 +151,9 @@ public class TimeValidatorTest { final Calendar hourGreater = createTime(GMT, testTime + hour, 100); // +1 hour final Calendar hourLess = createTime(GMT, testTime - hour, 100); // -1 hour - assertEquals(-1, validator.compareTime(value, milliGreater), "mili LT"); // > milli - assertEquals(0, validator.compareTime(value, value), "mili EQ"); // same time - assertEquals(1, validator.compareTime(value, milliLess), "mili GT"); // < milli + assertEquals(-1, validator.compareTime(value, milliGreater), "milli LT"); // > milli + assertEquals(0, validator.compareTime(value, value), "milli EQ"); // same time + assertEquals(1, validator.compareTime(value, milliLess), "milli GT"); // < milli assertEquals(-1, validator.compareSeconds(value, secGreater), "secs LT"); // +1 sec assertEquals(0, validator.compareSeconds(value, milliGreater), "secs =1"); // > milli diff --git a/src/test/java/org/apache/commons/validator/routines/checkdigit/AbstractCheckDigitTest.java b/src/test/java/org/apache/commons/validator/routines/checkdigit/AbstractCheckDigitTest.java index 41ccf114..ae7fcf19 100644 --- a/src/test/java/org/apache/commons/validator/routines/checkdigit/AbstractCheckDigitTest.java +++ b/src/test/java/org/apache/commons/validator/routines/checkdigit/AbstractCheckDigitTest.java @@ -67,7 +67,7 @@ public abstract class AbstractCheckDigitTest { * These are currently passed to both CheckDigit.calculate(expects a string without checkdigit) which is expected to throw an exception However that only * applies if the string is syntactically incorrect; and CheckDigit.isValid(expects a string including checkdigit) which is expected to return false * - * See https://issues.apache.org/jira/browse/VALIDATOR-344 for some dicussion on this + * See https://issues.apache.org/jira/browse/VALIDATOR-344 for some discussion on this */ protected String[] invalid = { "12345678A" }; diff --git a/src/test/resources/org/apache/commons/validator/RetrieveFormTest-config.xml b/src/test/resources/org/apache/commons/validator/RetrieveFormTest-config.xml index ff931e52..36c73a83 100644 --- a/src/test/resources/org/apache/commons/validator/RetrieveFormTest-config.xml +++ b/src/test/resources/org/apache/commons/validator/RetrieveFormTest-config.xml @@ -141,7 +141,7 @@ </form> </formset> - <!-- Candaian French Variant formset --> + <!-- Canadian French Variant formset --> <formset language="fr" country="CA" variant="XXX"> <form name="testForm_language_country_variant">