directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r370302 - in /directory/trunks/common/ldap/src/main/java/org/apache/ldap/common: filter/SubstringNode.java util/StringTools.java
Date Wed, 18 Jan 2006 23:20:06 GMT
Author: elecharny
Date: Wed Jan 18 15:19:58 2006
New Revision: 370302

URL: http://svn.apache.org/viewcvs?rev=370302&view=rev
Log:
The bug fix was not correct for spaces into the regexp. Fixed correctly now

Modified:
    directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/filter/SubstringNode.java
    directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/util/StringTools.java

Modified: directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/filter/SubstringNode.java
URL: http://svn.apache.org/viewcvs/directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/filter/SubstringNode.java?rev=370302&r1=370301&r2=370302&view=diff
==============================================================================
--- directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/filter/SubstringNode.java
(original)
+++ directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/filter/SubstringNode.java
Wed Jan 18 15:19:58 2006
@@ -151,6 +151,10 @@
             for ( int i = 0 ; i < any.length ; i++ )
             {
                 any[i] = ( String ) normalizer.normalize( anyPattern.get( i ) );
+                if ( any[i].length() == 0 )
+                {
+                    any[i] = " ";
+                }
             }
 
             String initialStr = null;

Modified: directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/util/StringTools.java
URL: http://svn.apache.org/viewcvs/directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/util/StringTools.java?rev=370302&r1=370301&r2=370302&view=diff
==============================================================================
--- directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/util/StringTools.java
(original)
+++ directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/util/StringTools.java
Wed Jan 18 15:19:58 2006
@@ -372,15 +372,7 @@
         {
             for ( int i = 0; i < anyPattern.length; i++ ) 
             {
-                if ( anyPattern[i].length() == 0 )
-                {
-                    // we must keep the space
-                    buf.append( ".* " );
-                }
-                else
-                {
-                    buf.append( ".*" ).append( anyPattern[i] ) ;
-                }
+                buf.append( ".*" ).append( anyPattern[i] ) ;
             }
         }
 



Mime
View raw message