You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by dw...@apache.org on 2009/09/02 23:59:14 UTC

svn commit: r810708 - in /commons/sandbox/validator2/trunk: build.xml pom.xml project.xml src/main/java/org/apache/commons/validator/GenericValidator.java xdocs/changes.xml

Author: dwoods
Date: Wed Sep  2 21:59:14 2009
New Revision: 810708

URL: http://svn.apache.org/viewvc?rev=810708&view=rev
Log:
VALIDATOR-279 Fix compile failure from removing depricated classes in last commit.  Update version from 1.4-SNAPSHOT to 2.0-SNAPSHOT.  Udpate scm loctions.  Add UTF8 property for resource filtering.

Modified:
    commons/sandbox/validator2/trunk/build.xml
    commons/sandbox/validator2/trunk/pom.xml
    commons/sandbox/validator2/trunk/project.xml
    commons/sandbox/validator2/trunk/src/main/java/org/apache/commons/validator/GenericValidator.java
    commons/sandbox/validator2/trunk/xdocs/changes.xml

Modified: commons/sandbox/validator2/trunk/build.xml
URL: http://svn.apache.org/viewvc/commons/sandbox/validator2/trunk/build.xml?rev=810708&r1=810707&r2=810708&view=diff
==============================================================================
--- commons/sandbox/validator2/trunk/build.xml (original)
+++ commons/sandbox/validator2/trunk/build.xml Wed Sep  2 21:59:14 2009
@@ -68,7 +68,7 @@
   <property name="component.title"         value="Commons Validator"/>
 
   <!-- The current version number of this component -->
-  <property name="component.version"       value="1.4-SNAPSHOT"/>
+  <property name="component.version"       value="2.0-SNAPSHOT"/>
 
   <!-- The base directory for compilation targets -->
   <property name="build.home"              value="target"/>
@@ -113,10 +113,10 @@
 
 
   <!-- source JDK version (should be same as maven.compile.source) -->
-  <property name="compile.source"          value="1.4"/>
+  <property name="compile.source"          value="1.5"/>
 
   <!-- target JDK version (should be same as maven.compile.target) -->
-  <property name="compile.target"          value="1.4"/>
+  <property name="compile.target"          value="1.5"/>
 
   <!-- Should Java compilations set the 'debug' compiler option? -->
   <property name="compile.debug"           value="true"/>

Modified: commons/sandbox/validator2/trunk/pom.xml
URL: http://svn.apache.org/viewvc/commons/sandbox/validator2/trunk/pom.xml?rev=810708&r1=810707&r2=810708&view=diff
==============================================================================
--- commons/sandbox/validator2/trunk/pom.xml (original)
+++ commons/sandbox/validator2/trunk/pom.xml Wed Sep  2 21:59:14 2009
@@ -27,7 +27,7 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>commons-validator</groupId>
     <artifactId>commons-validator</artifactId>
-    <version>1.4-SNAPSHOT</version>
+    <version>2.0-SNAPSHOT</version>
     <name>Commons Validator</name>
     <description>
         Commons Validator provides the building blocks for both client side validation and server side data validation. It may be used standalone or with a framework like Struts.
@@ -106,19 +106,20 @@
     </contributors>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/commons/proper/validator/trunk/</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/commons/proper/validator/trunk/</developerConnection>
-        <url>http://svn.apache.org/viewvc/commons/proper/validator/trunk/</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/commons/sandbox/validator2/trunk/</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/commons/sandbox/validator2/trunk/</developerConnection>
+        <url>http://svn.apache.org/viewvc/commons/sandbox/validator2/trunk/</url>
     </scm>
 
     <properties>
-        <maven.compile.source>1.4</maven.compile.source>
-        <maven.compile.target>1.4</maven.compile.target>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <maven.compile.source>1.5</maven.compile.source>
+        <maven.compile.target>1.5</maven.compile.target>
         <commons.componentid>validator</commons.componentid>
         <commons.release.version>1.3.1</commons.release.version>
         <commons.binary.suffix></commons.binary.suffix>
         <commons.jira.id>VALIDATOR</commons.jira.id>
-        <commons.jira.pid>12310494</commons.jira.pid>
+        <commons.jira.pid>12330494</commons.jira.pid>
     </properties> 
 
     <build>

Modified: commons/sandbox/validator2/trunk/project.xml
URL: http://svn.apache.org/viewvc/commons/sandbox/validator2/trunk/project.xml?rev=810708&r1=810707&r2=810708&view=diff
==============================================================================
--- commons/sandbox/validator2/trunk/project.xml (original)
+++ commons/sandbox/validator2/trunk/project.xml Wed Sep  2 21:59:14 2009
@@ -22,7 +22,7 @@
   <name>Validator</name>
   <groupId>commons-validator</groupId>
   <artifactId>commons-validator</artifactId>
-  <currentVersion>1.4-SNAPSHOT</currentVersion>
+  <currentVersion>2.0-SNAPSHOT</currentVersion>
   <inceptionYear>2002</inceptionYear>
   <shortDescription>Commons Validator</shortDescription>
   <description>
@@ -96,6 +96,11 @@
       <name>1.3.0</name>
       <tag>VALIDATOR_1_3_0/</tag>
     </version>
+    <version>
+      <id>1.3.1</id>
+      <name>1.3.1</name>
+      <tag>VALIDATOR_1_3_1/</tag>
+    </version>
   </versions>
  
   <developers>

Modified: commons/sandbox/validator2/trunk/src/main/java/org/apache/commons/validator/GenericValidator.java
URL: http://svn.apache.org/viewvc/commons/sandbox/validator2/trunk/src/main/java/org/apache/commons/validator/GenericValidator.java?rev=810708&r1=810707&r2=810708&view=diff
==============================================================================
--- commons/sandbox/validator2/trunk/src/main/java/org/apache/commons/validator/GenericValidator.java (original)
+++ commons/sandbox/validator2/trunk/src/main/java/org/apache/commons/validator/GenericValidator.java Wed Sep  2 21:59:14 2009
@@ -17,9 +17,15 @@
 package org.apache.commons.validator;
 
 import java.io.Serializable;
+import java.text.DateFormat;
 import java.util.Locale;
 import java.util.regex.Pattern;
 
+import org.apache.commons.validator.routines.CreditCardValidator;
+import org.apache.commons.validator.routines.DateValidator;
+import org.apache.commons.validator.routines.EmailValidator;
+import org.apache.commons.validator.routines.UrlValidator;
+
 /**
  * This class contains basic methods for performing validations.
  *
@@ -151,7 +157,11 @@
      * @return true if the value can be converted to a Date.
      */
     public static boolean isDate(String value, String datePattern, boolean strict) {
-        return DateValidator.getInstance().isValid(value, datePattern, strict);
+        // return DateValidator.getInstance().validate(value, datePattern, strict);
+        if (strict == true)
+            return (DateValidator.getInstance().validate(value, datePattern) != null);
+        else
+            return ((new DateValidator(strict, DateFormat.SHORT)).validate(value, datePattern) != null);
     }
 
     /**

Modified: commons/sandbox/validator2/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/commons/sandbox/validator2/trunk/xdocs/changes.xml?rev=810708&r1=810707&r2=810708&view=diff
==============================================================================
--- commons/sandbox/validator2/trunk/xdocs/changes.xml (original)
+++ commons/sandbox/validator2/trunk/xdocs/changes.xml Wed Sep  2 21:59:14 2009
@@ -39,6 +39,15 @@
   </properties>
   <body>
 
+    <release version="2.0-SNAPSHOT" date="in SVN" description="JSR-303 Support">
+      <action dev="dwoods" type="add" issue="VALIDATOR-279">
+         Create an implementation of the JSR-303 Bean Validation Spec
+      </action>
+      <action dev="dwoods" type="update">
+          <b>JDK 1.5</b> - minimum runtime dependency (was 1.4).
+      </action>
+    </release>
+
     <release version="1.4-SNAPSHOT" date="in SVN" description="JDK 1.4 (minimum)">
       <action dev="niallp" type="fix" issue="VALIDATOR-226" due-to="Lian Ort">
           Null-Stream input to ValidatorResources leads to MalformedURLExceptions