This patch introduces two new functions to the DateValidator, o boolean isLenient() o void setLenient(boolean)
This patch also marks the existing (mispelled) functions, isLeniant and setLeniant, as deprecated. Index: cli/src/java/org/apache/commons/cli2/validation/DateValidator.java =================================================================== --- cli.orig/src/java/org/apache/commons/cli2/validation/DateValidator.java 2005-12-19 23:38:45.000000000 +1100 +++ cli/src/java/org/apache/commons/cli2/validation/DateValidator.java 2005-12-20 18:51:32.000000000 +1100 @@ -182,7 +182,12 @@ } } - public void setLeniant(final boolean lenient) { + /** + * Sets whether this validator uses lenient parsing. + * + * @param lenient whether this validator uses lenient parsing + */ + public void setLenient(final boolean lenient) { for (int i = 0; i < this.formats.length; i++) { this.formats[i].setLenient(lenient); } @@ -190,11 +195,36 @@ this.isLenient = lenient; } - public boolean isLeniant() { + /** + * Returns whether this validator uses lenient parsing. + * + * @return whether this validator uses lenient parsing + */ + public boolean isLenient() { return this.isLenient; } /** + * Sets whether this validator uses lenient parsing. + * + * @param lenient whether this validator uses lenient parsing + * @deprecated Replaced by the (correctly spelled) setLenient method. + */ + public void setLeniant(final boolean lenient) { + setLenient(lenient); + } + + /** + * Returns whether this validator uses lenient parsing. + * + * @return whether this validator uses lenient parsing + * @deprecated Replaced by the (correctly spelled) isLenient() method. + */ + public boolean isLeniant() { + return isLenient(); + } + + /** * Returns the maximum date permitted. * * @return Date the maximum date permitted. If no maximum date has been -- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]