commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bspeak...@apache.org
Subject svn commit: r590906 - /commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/GenericValidator.java
Date Thu, 01 Nov 2007 05:40:51 GMT
Author: bspeakmon
Date: Wed Oct 31 22:40:50 2007
New Revision: 590906

URL: http://svn.apache.org/viewvc?rev=590906&view=rev
Log:
- VALIDATOR-193: replacing oro regex with java.util.regex in GenericValidator

Modified:
    commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/GenericValidator.java

Modified: commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/GenericValidator.java
URL: http://svn.apache.org/viewvc/commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/GenericValidator.java?rev=590906&r1=590905&r2=590906&view=diff
==============================================================================
--- commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/GenericValidator.java
(original)
+++ commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/GenericValidator.java
Wed Oct 31 22:40:50 2007
@@ -18,8 +18,7 @@
 
 import java.io.Serializable;
 import java.util.Locale;
-
-import org.apache.oro.text.perl.Perl5Util;
+import java.util.regex.Pattern;
 
 /**
  * This class contains basic methods for performing validations.
@@ -62,8 +61,7 @@
             return false;
         }
 
-        Perl5Util matcher = new Perl5Util();
-        return matcher.match("/" + regexp + "/", value);
+        return Pattern.matches(regexp, value);
     }
 
     /**



Mime
View raw message