directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r370291 - /directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/schema/RegexSyntaxChecker.java
Date Wed, 18 Jan 2006 22:43:30 GMT
Author: elecharny
Date: Wed Jan 18 14:43:26 2006
New Revision: 370291

URL: http://svn.apache.org/viewcvs?rev=370291&view=rev
Log:
- Get rid of a.o.regexp and oro, replaced them by jdk 1.4 regexp

Modified:
    directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/schema/RegexSyntaxChecker.java

Modified: directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/schema/RegexSyntaxChecker.java
URL: http://svn.apache.org/viewcvs/directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/schema/RegexSyntaxChecker.java?rev=370291&r1=370290&r2=370291&view=diff
==============================================================================
--- directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/schema/RegexSyntaxChecker.java
(original)
+++ directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/schema/RegexSyntaxChecker.java
Wed Jan 18 14:43:26 2006
@@ -20,8 +20,6 @@
 import javax.naming.NamingException;
 import javax.naming.directory.InvalidAttributeValueException;
 
-import org.apache.oro.text.perl.Perl5Util;
-
 
 /**
  * A SyntaxChecker implemented using Perl5 regular expressions to constrain 
@@ -37,8 +35,6 @@
     private final String oid;
     /** the set of regular expressions */
     private final String [] expressions;
-    /** the Perl5 regex utilities */
-    private final Perl5Util perl = new Perl5Util();
 
 
     /**
@@ -75,17 +71,18 @@
         if ( value instanceof String )
         {
             str = ( String ) value;
-        }
 
-        for ( int ii = 0; ii < expressions.length; ii++ )
-        {
-            match = match && perl.match( expressions[ii], str );
-            if ( ! match )
-            {
-                break;
-            }
+	        for ( int i = 0; i < expressions.length; i++ )
+	        {
+	            match = match && str.matches( expressions[i] );
+	            
+	            if ( ! match )
+	            {
+	                break;
+	            }
+	        }
         }
-
+        
         return match;
     }
 



Mime
View raw message