You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by tu...@apache.org on 2002/10/11 03:16:37 UTC
cvs commit: jakarta-commons/validator/src/share/org/apache/commons/validator GenericTypeValidator.java GenericValidator.java
turner 2002/10/10 18:16:37
Modified: validator/src/share/org/apache/commons/validator
GenericTypeValidator.java GenericValidator.java
Log:
Removed unused variables and fixed JavaDoc
(Closes bug 13421 )
Revision Changes Path
1.5 +5 -5 jakarta-commons/validator/src/share/org/apache/commons/validator/GenericTypeValidator.java
Index: GenericTypeValidator.java
===================================================================
RCS file: /home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/GenericTypeValidator.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- GenericTypeValidator.java 2 Apr 2002 03:55:02 -0000 1.4
+++ GenericTypeValidator.java 11 Oct 2002 01:16:36 -0000 1.5
@@ -183,7 +183,7 @@
* is set to <code>false</code> for all.</p>
*
* @param value The value validation is being performed on.
- * @param datePattern The pattern passed to <code>SimpleDateFormat</code>.
+ * @param Locale The Locale to use to parse the date (system default if null)
*/
public static Date formatDate(String value, Locale locale) {
Date date = null;
1.7 +7 -7 jakarta-commons/validator/src/share/org/apache/commons/validator/GenericValidator.java
Index: GenericValidator.java
===================================================================
RCS file: /home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/GenericValidator.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- GenericValidator.java 19 Sep 2002 17:25:27 -0000 1.6
+++ GenericValidator.java 11 Oct 2002 01:16:37 -0000 1.7
@@ -174,7 +174,7 @@
* is set to <code>false</code> for all.</p>
*
* @param value The value validation is being performed on.
- * @param datePattern The pattern passed to <code>SimpleDateFormat</code>.
+ * @param Locale The locale to use for the date format, defaults to the default system default if null.
*/
public static boolean isDate(String value, Locale locale) {
boolean bValid = true;
@@ -190,7 +190,7 @@
formatter.setLenient(false);
- Date date = formatter.parse(value);
+ formatter.parse(value);
} catch (ParseException e) {
bValid = false;
}
@@ -221,7 +221,7 @@
SimpleDateFormat formatter = new SimpleDateFormat(datePattern);
formatter.setLenient(false);
- Date date = formatter.parse(value);
+ formatter.parse(value);
if (strict) {
if (datePattern.length() != value.length()) {
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>