directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r359127 [1/2] - in /directory/shared/ldap/trunk/apache2-provider/src: main/java/org/apache/asn1new/ldap/ main/java/org/apache/asn1new/ldap/codec/ main/java/org/apache/asn1new/ldap/codec/grammar/ main/java/org/apache/asn1new/ldap/codec/primi...
Date Mon, 26 Dec 2005 23:32:38 GMT
Author: elecharny
Date: Mon Dec 26 15:31:58 2005
New Revision: 359127

URL: http://svn.apache.org/viewcvs?rev=359127&view=rev
Log:
Use StringTools instead of StringUtils

Modified:
    directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/TwixDecoder.java
    directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/TwixEncoder.java
    directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/LdapMessageContainer.java
    directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/AbandonRequestGrammar.java
    directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/AddRequestGrammar.java
    directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/BindRequestGrammar.java
    directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/CompareRequestGrammar.java
    directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/DelRequestGrammar.java
    directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/FilterGrammar.java
    directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/LdapControlGrammar.java
    directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/LdapMessageGrammar.java
    directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/LdapResultGrammar.java
    directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/ModifyDNRequestGrammar.java
    directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/ModifyRequestGrammar.java
    directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/SearchRequestGrammar.java
    directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/SearchResultEntryGrammar.java
    directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/primitives/DNParser.java
    directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/primitives/LdapDN.java
    directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/primitives/LdapRDN.java
    directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/primitives/LdapURL.java
    directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/primitives/RDNParser.java
    directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/utils/DNUtils.java
    directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/AddRequest.java
    directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/BindRequest.java
    directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/CompareRequest.java
    directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/Control.java
    directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/ExtendedResponse.java
    directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/ModifyRequest.java
    directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/SearchRequest.java
    directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/SearchResultEntry.java
    directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/filters/AttributeValueAssertionFilter.java
    directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/filters/ExtensibleMatchFilter.java
    directory/shared/ldap/trunk/apache2-provider/src/test/org/apache/asn1new/ldap/codec/AbandonRequestTest.java
    directory/shared/ldap/trunk/apache2-provider/src/test/org/apache/asn1new/ldap/codec/AddRequestTest.java
    directory/shared/ldap/trunk/apache2-provider/src/test/org/apache/asn1new/ldap/codec/AddResponseTest.java
    directory/shared/ldap/trunk/apache2-provider/src/test/org/apache/asn1new/ldap/codec/BindRequestTest.java
    directory/shared/ldap/trunk/apache2-provider/src/test/org/apache/asn1new/ldap/codec/BindResponseTest.java
    directory/shared/ldap/trunk/apache2-provider/src/test/org/apache/asn1new/ldap/codec/CompareRequestTest.java
    directory/shared/ldap/trunk/apache2-provider/src/test/org/apache/asn1new/ldap/codec/CompareResponseTest.java
    directory/shared/ldap/trunk/apache2-provider/src/test/org/apache/asn1new/ldap/codec/DelRequestTest.java
    directory/shared/ldap/trunk/apache2-provider/src/test/org/apache/asn1new/ldap/codec/DelResponseTest.java
    directory/shared/ldap/trunk/apache2-provider/src/test/org/apache/asn1new/ldap/codec/ExtendedRequestTest.java
    directory/shared/ldap/trunk/apache2-provider/src/test/org/apache/asn1new/ldap/codec/ExtendedResponseTest.java
    directory/shared/ldap/trunk/apache2-provider/src/test/org/apache/asn1new/ldap/codec/LdapDecoderTest.java
    directory/shared/ldap/trunk/apache2-provider/src/test/org/apache/asn1new/ldap/codec/ModifyDNRequestTest.java
    directory/shared/ldap/trunk/apache2-provider/src/test/org/apache/asn1new/ldap/codec/ModifyDNResponseTest.java
    directory/shared/ldap/trunk/apache2-provider/src/test/org/apache/asn1new/ldap/codec/ModifyRequestTest.java
    directory/shared/ldap/trunk/apache2-provider/src/test/org/apache/asn1new/ldap/codec/ModifyResponseTest.java
    directory/shared/ldap/trunk/apache2-provider/src/test/org/apache/asn1new/ldap/codec/SearchRequestTest.java
    directory/shared/ldap/trunk/apache2-provider/src/test/org/apache/asn1new/ldap/codec/SearchResultDoneTest.java
    directory/shared/ldap/trunk/apache2-provider/src/test/org/apache/asn1new/ldap/codec/SearchResultEntryTest.java
    directory/shared/ldap/trunk/apache2-provider/src/test/org/apache/asn1new/ldap/codec/SearchResultReferenceTest.java
    directory/shared/ldap/trunk/apache2-provider/src/test/org/apache/asn1new/ldap/codec/UnBindRequestTest.java
    directory/shared/ldap/trunk/apache2-provider/src/test/org/apache/asn1new/ldap/codec/utils/DNUtilsTest.java

Modified: directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/TwixDecoder.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/TwixDecoder.java?rev=359127&r1=359126&r2=359127&view=diff
==============================================================================
--- directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/TwixDecoder.java (original)
+++ directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/TwixDecoder.java Mon Dec 26 15:31:58 2005
@@ -11,10 +11,11 @@
 import org.apache.asn1new.ber.tlv.TLVStateEnum;
 import org.apache.asn1new.ldap.codec.LdapDecoder;
 import org.apache.asn1new.ldap.codec.LdapMessageContainer;
-import org.apache.asn1.codec.util.StringUtils;
+
 import org.apache.ldap.common.message.spi.Provider;
 import org.apache.ldap.common.message.spi.ProviderDecoder;
 import org.apache.ldap.common.message.spi.ProviderException;
+import org.apache.ldap.common.util.StringTools;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -77,7 +78,7 @@
     		
     		if (buf.hasArray()) 
     		{
-    			log.debug( StringUtils.dumpBytes( buf.array() ) );
+    			log.debug( StringTools.dumpBytes( buf.array() ) );
     		}
     		else
     		{
@@ -90,7 +91,7 @@
     			}
     			
     			buf.flip();
-    			log.debug( StringUtils.dumpBytes( array ) );
+    			log.debug( StringTools.dumpBytes( array ) );
     		}
     	}
     	

Modified: directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/TwixEncoder.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/TwixEncoder.java?rev=359127&r1=359126&r2=359127&view=diff
==============================================================================
--- directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/TwixEncoder.java (original)
+++ directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/TwixEncoder.java Mon Dec 26 15:31:58 2005
@@ -21,10 +21,10 @@
 import org.apache.asn1.codec.stateful.EncoderMonitor;
 import org.apache.asn1.codec.stateful.StatefulEncoder;
 import org.apache.asn1new.ldap.pojo.LdapMessage;
-import org.apache.asn1.codec.util.StringUtils;
 import org.apache.ldap.common.message.spi.Provider;
 import org.apache.ldap.common.message.spi.ProviderEncoder;
 import org.apache.ldap.common.message.spi.ProviderException;
+import org.apache.ldap.common.util.StringTools;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -114,7 +114,7 @@
         	
         	if (log.isDebugEnabled())
         	{
-        		log.debug( "Encoded PDU : " + StringUtils.dumpBytes( pdu.array() ) );
+        		log.debug( "Encoded PDU : " + StringTools.dumpBytes( pdu.array() ) );
         	}
 
             pdu.flip();
@@ -150,7 +150,7 @@
         	
         	if (log.isDebugEnabled())
         	{
-        		log.debug( "Encoded PDU : " + StringUtils.dumpBytes( pdu ) );
+        		log.debug( "Encoded PDU : " + StringTools.dumpBytes( pdu ) );
         	}
 
         	return pdu;

Modified: directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/LdapMessageContainer.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/LdapMessageContainer.java?rev=359127&r1=359126&r2=359127&view=diff
==============================================================================
--- directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/LdapMessageContainer.java (original)
+++ directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/LdapMessageContainer.java Mon Dec 26 15:31:58 2005
@@ -48,7 +48,7 @@
 import org.apache.asn1new.ldap.codec.grammar.SearchResultReferenceGrammar;
 import org.apache.asn1new.ldap.codec.grammar.UnBindRequestGrammar;
 import org.apache.asn1new.ldap.pojo.LdapMessage;
-import org.apache.asn1.codec.util.StringUtils;
+import org.apache.ldap.common.util.StringTools;
 
 
 /**
@@ -157,6 +157,6 @@
      */
     public boolean isBinary( String id )
     {
-        return binaries.contains( StringUtils.lowerCase( StringUtils.trim( id ) ) );
+        return binaries.contains( StringTools.lowerCase( StringTools.trim( id ) ) );
     }
 }

Modified: directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/AbandonRequestGrammar.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/AbandonRequestGrammar.java?rev=359127&r1=359126&r2=359127&view=diff
==============================================================================
--- directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/AbandonRequestGrammar.java (original)
+++ directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/AbandonRequestGrammar.java Mon Dec 26 15:31:58 2005
@@ -26,11 +26,11 @@
 import org.apache.asn1new.ber.tlv.Value;
 import org.apache.asn1new.util.IntegerDecoder;
 import org.apache.asn1new.util.IntegerDecoderException;
-import org.apache.asn1.codec.util.StringUtils;
 import org.apache.asn1new.ldap.codec.LdapConstants;
 import org.apache.asn1new.ldap.codec.LdapMessageContainer;
 import org.apache.asn1new.ldap.pojo.AbandonRequest;
 import org.apache.asn1new.ldap.pojo.LdapMessage;
+import org.apache.ldap.common.util.StringTools;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -121,7 +121,7 @@
                         }
                         catch ( IntegerDecoderException ide )
                         {
-                            log.error("The Abandonned Message Id " + StringUtils.dumpBytes( value.getData() ) + 
+                            log.error("The Abandonned Message Id " + StringTools.dumpBytes( value.getData() ) + 
                                         " is invalid : " + ide.getMessage() + ". The message ID must be between (0 .. 2 147 483 647)" );
                             
                             throw new DecoderException( ide.getMessage() );

Modified: directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/AddRequestGrammar.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/AddRequestGrammar.java?rev=359127&r1=359126&r2=359127&view=diff
==============================================================================
--- directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/AddRequestGrammar.java (original)
+++ directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/AddRequestGrammar.java Mon Dec 26 15:31:58 2005
@@ -26,7 +26,6 @@
 import org.apache.asn1new.ber.grammar.IGrammar;
 import org.apache.asn1new.ber.tlv.TLV;
 import org.apache.asn1new.ber.tlv.UniversalTag;
-import org.apache.asn1.codec.util.StringUtils;
 import org.apache.asn1new.ldap.codec.LdapConstants;
 import org.apache.asn1new.ldap.codec.LdapMessageContainer;
 import org.apache.asn1new.ldap.codec.primitives.LdapDN;
@@ -34,6 +33,7 @@
 import org.apache.asn1new.ldap.codec.primitives.LdapStringEncodingException;
 import org.apache.asn1new.ldap.pojo.AddRequest;
 import org.apache.asn1new.ldap.pojo.LdapMessage;
+import org.apache.ldap.common.util.StringTools;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -139,7 +139,7 @@
                             }
                             catch ( InvalidNameException ine )
                             {
-                                log.error( "The DN is invalid : " + StringUtils.dumpBytes(tlv.getValue().getData()) + " : " + ine.getMessage() );
+                                log.error( "The DN is invalid : " + StringTools.dumpBytes(tlv.getValue().getData()) + " : " + ine.getMessage() );
                                 throw new DecoderException( "Incorrect DN given : " + ine.getMessage() );
                             }
                         }
@@ -257,7 +257,7 @@
                             }
                             catch ( LdapStringEncodingException lsee )
                             {
-                                log.error( "The type is invalid : " + StringUtils.dumpBytes( tlv.getValue().getData() ) + " : " + lsee.getMessage() );
+                                log.error( "The type is invalid : " + StringTools.dumpBytes( tlv.getValue().getData() ) + " : " + lsee.getMessage() );
                                 throw new DecoderException( "Invalid attribute type : " + lsee.getMessage() );
                             }
                         }
@@ -343,12 +343,12 @@
                                 
                                 if ( log.isDebugEnabled() )
                                 {
-                                    log.debug( "Adding value " + StringUtils.dumpBytes( (byte[])value ) );
+                                    log.debug( "Adding value " + StringTools.dumpBytes( (byte[])value ) );
                                 }
                             }
                             else
                             {
-                                value = StringUtils.utf8ToString( tlv.getValue().getData() );
+                                value = StringTools.utf8ToString( tlv.getValue().getData() );
 
                                 if ( log.isDebugEnabled() )
                                 {

Modified: directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/BindRequestGrammar.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/BindRequestGrammar.java?rev=359127&r1=359126&r2=359127&view=diff
==============================================================================
--- directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/BindRequestGrammar.java (original)
+++ directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/BindRequestGrammar.java Mon Dec 26 15:31:58 2005
@@ -29,8 +29,6 @@
 import org.apache.asn1new.ber.tlv.Value;
 import org.apache.asn1new.util.IntegerDecoder;
 import org.apache.asn1new.util.IntegerDecoderException;
-import org.apache.asn1.codec.util.StringUtils;
-//import org.apache.asn1new.primitives.OctetString;
 import org.apache.asn1new.ldap.codec.LdapConstants;
 import org.apache.asn1new.ldap.codec.LdapMessageContainer;
 import org.apache.asn1new.ldap.codec.primitives.LdapDN;
@@ -40,6 +38,7 @@
 import org.apache.asn1new.ldap.pojo.LdapMessage;
 import org.apache.asn1new.ldap.pojo.SaslCredentials;
 import org.apache.asn1new.ldap.pojo.SimpleAuthentication;
+import org.apache.ldap.common.util.StringTools;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -163,7 +162,7 @@
                         }
                         catch ( IntegerDecoderException ide )
                         {
-                            log.error("The version " + StringUtils.dumpBytes( value.getData() ) + 
+                            log.error("The version " + StringTools.dumpBytes( value.getData() ) + 
                                     " is invalid : " + ide.getMessage() + ". The version must be between (0 .. 127)" );
                         
                             throw new DecoderException( ide.getMessage() );
@@ -211,7 +210,7 @@
                             }
                             catch ( InvalidNameException ine )
                             {
-                                log.error( "Incorrect DN given : " + StringUtils.dumpBytes( tlv.getValue().getData() ) + " : " + ine.getMessage() );
+                                log.error( "Incorrect DN given : " + StringTools.dumpBytes( tlv.getValue().getData() ) + " : " + ine.getMessage() );
                                 throw new DecoderException( "Incorrect DN given : " + ine.getMessage() );
                             }
                         }
@@ -339,7 +338,7 @@
                             }
                             catch ( LdapStringEncodingException lsee )
                             {
-                                log.error( "Invalid mechanism : " + StringUtils.dumpBytes( tlv.getValue().getData() ) + " : " + lsee.getMessage() );
+                                log.error( "Invalid mechanism : " + StringTools.dumpBytes( tlv.getValue().getData() ) + " : " + lsee.getMessage() );
                                 throw new DecoderException( lsee.getMessage() );
                             }
                         }

Modified: directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/CompareRequestGrammar.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/CompareRequestGrammar.java?rev=359127&r1=359126&r2=359127&view=diff
==============================================================================
--- directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/CompareRequestGrammar.java (original)
+++ directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/CompareRequestGrammar.java Mon Dec 26 15:31:58 2005
@@ -26,7 +26,6 @@
 import org.apache.asn1new.ber.grammar.IGrammar;
 import org.apache.asn1new.ber.tlv.TLV;
 import org.apache.asn1new.ber.tlv.UniversalTag;
-import org.apache.asn1.codec.util.StringUtils;
 import org.apache.asn1new.ldap.codec.LdapConstants;
 import org.apache.asn1new.ldap.codec.LdapMessageContainer;
 import org.apache.asn1new.ldap.codec.primitives.LdapDN;
@@ -34,6 +33,7 @@
 import org.apache.asn1new.ldap.codec.primitives.LdapStringEncodingException;
 import org.apache.asn1new.ldap.pojo.CompareRequest;
 import org.apache.asn1new.ldap.pojo.LdapMessage;
+import org.apache.ldap.common.util.StringTools;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -142,8 +142,8 @@
                             }
                             catch ( InvalidNameException ine )
                             {
-                                log.error( "The DN to compare  (" + StringUtils.dumpBytes( tlv.getValue().getData() ) + ") is invalid" );
-                                throw new DecoderException( "Invalid DN " + StringUtils.dumpBytes( tlv.getValue().getData() ) + ", : " + ine.getMessage() );
+                                log.error( "The DN to compare  (" + StringTools.dumpBytes( tlv.getValue().getData() ) + ") is invalid" );
+                                throw new DecoderException( "Invalid DN " + StringTools.dumpBytes( tlv.getValue().getData() ) + ", : " + ine.getMessage() );
                             }
                         }
 
@@ -215,8 +215,8 @@
                             }
                             catch ( LdapStringEncodingException lsee )
                             {
-                                log.error( "The attribute description (" + StringUtils.dumpBytes( tlv.getValue().getData() ) + ") is invalid" );
-                                throw new DecoderException( "Invalid attribute description " + StringUtils.dumpBytes( tlv.getValue().getData() ) + ", : " + lsee.getMessage() );
+                                log.error( "The attribute description (" + StringTools.dumpBytes( tlv.getValue().getData() ) + ") is invalid" );
+                                throw new DecoderException( "Invalid attribute description " + StringTools.dumpBytes( tlv.getValue().getData() ) + ", : " + lsee.getMessage() );
                                 
                             }
                         }
@@ -272,12 +272,12 @@
 
                                 if ( log.isDebugEnabled() )
                                 {
-                                    log.debug( "Comparing attribute value " + StringUtils.dumpBytes( (byte[])compareRequest.getAssertionValue() ) );
+                                    log.debug( "Comparing attribute value " + StringTools.dumpBytes( (byte[])compareRequest.getAssertionValue() ) );
                                 }
                             }
                             else
                             {
-                                compareRequest.setAssertionValue( StringUtils.utf8ToString( tlv.getValue().getData() ) );
+                                compareRequest.setAssertionValue( StringTools.utf8ToString( tlv.getValue().getData() ) );
 
                                 if ( log.isDebugEnabled() )
                                 {

Modified: directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/DelRequestGrammar.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/DelRequestGrammar.java?rev=359127&r1=359126&r2=359127&view=diff
==============================================================================
--- directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/DelRequestGrammar.java (original)
+++ directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/DelRequestGrammar.java Mon Dec 26 15:31:58 2005
@@ -30,7 +30,7 @@
 import org.apache.asn1new.ldap.codec.primitives.LdapDN;
 import org.apache.asn1new.ldap.pojo.DelRequest;
 import org.apache.asn1new.ldap.pojo.LdapMessage;
-import org.apache.asn1.codec.util.StringUtils;
+import org.apache.ldap.common.util.StringTools;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -112,8 +112,8 @@
                             }
                             catch ( InvalidNameException ine )
                             {
-                                log.error( "The DN to delete  (" + StringUtils.dumpBytes( tlv.getValue().getData() ) + ") is invalid" );
-                                throw new DecoderException( "Invalid DN " + StringUtils.dumpBytes( tlv.getValue().getData() ) + ", : " + ine.getMessage() );
+                                log.error( "The DN to delete  (" + StringTools.dumpBytes( tlv.getValue().getData() ) + ") is invalid" );
+                                throw new DecoderException( "Invalid DN " + StringTools.dumpBytes( tlv.getValue().getData() ) + ", : " + ine.getMessage() );
                             }
                         }
 

Modified: directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/FilterGrammar.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/FilterGrammar.java?rev=359127&r1=359126&r2=359127&view=diff
==============================================================================
--- directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/FilterGrammar.java (original)
+++ directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/FilterGrammar.java Mon Dec 26 15:31:58 2005
@@ -27,7 +27,6 @@
 import org.apache.asn1new.ber.tlv.Value;
 import org.apache.asn1new.util.BooleanDecoder;
 import org.apache.asn1new.util.BooleanDecoderException;
-import org.apache.asn1.codec.util.StringUtils;
 import org.apache.asn1new.ldap.codec.LdapConstants;
 import org.apache.asn1new.ldap.codec.LdapMessageContainer;
 import org.apache.asn1new.ldap.codec.primitives.LdapString;
@@ -44,6 +43,7 @@
 import org.apache.asn1new.ldap.pojo.filters.OrFilter;
 import org.apache.asn1new.ldap.pojo.filters.PresentFilter;
 import org.apache.asn1new.ldap.pojo.filters.SubstringFilter;
+import org.apache.ldap.common.util.StringTools;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -446,8 +446,8 @@
                         }
                         catch ( LdapStringEncodingException lsee )
                         {
-                            log.error( "The assertion description (" + StringUtils.dumpBytes( tlv.getValue().getData() ) + ") is invalid" );
-                            throw new DecoderException( "Invalid assertion description " + StringUtils.dumpBytes( tlv.getValue().getData() ) + ", : " + lsee.getMessage() );
+                            log.error( "The assertion description (" + StringTools.dumpBytes( tlv.getValue().getData() ) + ") is invalid" );
+                            throw new DecoderException( "Invalid assertion description " + StringTools.dumpBytes( tlv.getValue().getData() ) + ", : " + lsee.getMessage() );
                         }
                         
                         AttributeValueAssertionFilter currentFilter = (AttributeValueAssertionFilter)searchRequest.getCurrentFilter();
@@ -500,7 +500,7 @@
                         }
                         else
                         {
-                            assertion.setAssertionValue( StringUtils.utf8ToString( (byte[])assertionValue ) );
+                            assertion.setAssertionValue( StringTools.utf8ToString( (byte[])assertionValue ) );
                         }
                         
                         // We now have to get back to the nearest filter which is not terminal.
@@ -536,8 +536,8 @@
                         }
                         catch ( LdapStringEncodingException lsee )
                         {
-                            log.error( "The assertion value (" + StringUtils.dumpBytes( tlv.getValue().getData() ) + ") is invalid" );
-                            throw new DecoderException( "Invalid assertion value " + StringUtils.dumpBytes( tlv.getValue().getData() ) + ", : " + lsee.getMessage() );
+                            log.error( "The assertion value (" + StringTools.dumpBytes( tlv.getValue().getData() ) + ") is invalid" );
+                            throw new DecoderException( "Invalid assertion value " + StringTools.dumpBytes( tlv.getValue().getData() ) + ", : " + lsee.getMessage() );
                         }
                         
                         AttributeValueAssertionFilter currentFilter = (AttributeValueAssertionFilter)searchRequest.getCurrentFilter();
@@ -598,8 +598,8 @@
                         }
                         catch ( LdapStringEncodingException lsee )
                         {
-                            log.error( "Present filter attribute description (" + StringUtils.dumpBytes( tlv.getValue().getData() ) + ") is invalid" );
-                            throw new DecoderException( "Invalid present filter attribute description " + StringUtils.dumpBytes( tlv.getValue().getData() ) + ", : " + lsee.getMessage() );
+                            log.error( "Present filter attribute description (" + StringTools.dumpBytes( tlv.getValue().getData() ) + ") is invalid" );
+                            throw new DecoderException( "Invalid present filter attribute description " + StringTools.dumpBytes( tlv.getValue().getData() ) + ", : " + lsee.getMessage() );
                         }
                         
                         // We now have to get back to the nearest filter which is not terminal.
@@ -697,8 +697,8 @@
                         }
                         catch ( LdapStringEncodingException lsee )
                         {
-                            log.error( "The substring filter type (" + StringUtils.dumpBytes( tlv.getValue().getData() ) + ") is invalid" );
-                            throw new DecoderException( "Invalid substring filter type " + StringUtils.dumpBytes( tlv.getValue().getData() ) + ", : " + lsee.getMessage() );
+                            log.error( "The substring filter type (" + StringTools.dumpBytes( tlv.getValue().getData() ) + ") is invalid" );
+                            throw new DecoderException( "Invalid substring filter type " + StringTools.dumpBytes( tlv.getValue().getData() ) + ", : " + lsee.getMessage() );
                         }
 
                         // We now have to get back to the nearest filter which is not terminal.
@@ -765,8 +765,8 @@
                         }
                         catch ( LdapStringEncodingException lsee )
                         {
-                            log.error( "The substring filter initial (" + StringUtils.dumpBytes( tlv.getValue().getData() ) + ") is invalid" );
-                            throw new DecoderException( "Invalid substring filter initial " + StringUtils.dumpBytes( tlv.getValue().getData() ) + ", : " + lsee.getMessage() );
+                            log.error( "The substring filter initial (" + StringTools.dumpBytes( tlv.getValue().getData() ) + ") is invalid" );
+                            throw new DecoderException( "Invalid substring filter initial " + StringTools.dumpBytes( tlv.getValue().getData() ) + ", : " + lsee.getMessage() );
                         }
 
                         // We now have to get back to the nearest filter which is not terminal.
@@ -827,8 +827,8 @@
                         }
                         catch ( LdapStringEncodingException lsee )
                         {
-                            log.error( "The substring any filter (" + StringUtils.dumpBytes( tlv.getValue().getData() ) + ") is invalid" );
-                            throw new DecoderException( "Invalid substring any filter " + StringUtils.dumpBytes( tlv.getValue().getData() ) + ", : " + lsee.getMessage() );
+                            log.error( "The substring any filter (" + StringTools.dumpBytes( tlv.getValue().getData() ) + ") is invalid" );
+                            throw new DecoderException( "Invalid substring any filter " + StringTools.dumpBytes( tlv.getValue().getData() ) + ", : " + lsee.getMessage() );
                         }
 
                         // We now have to get back to the nearest filter which is not terminal.
@@ -902,8 +902,8 @@
                         }
                         catch ( LdapStringEncodingException lsee )
                         {
-                            log.error( "The substring final filter (" + StringUtils.dumpBytes( tlv.getValue().getData() ) + ") is invalid" );
-                            throw new DecoderException( "Invalid substring final filter " + StringUtils.dumpBytes( tlv.getValue().getData() ) + ", : " + lsee.getMessage() );
+                            log.error( "The substring final filter (" + StringTools.dumpBytes( tlv.getValue().getData() ) + ") is invalid" );
+                            throw new DecoderException( "Invalid substring final filter " + StringTools.dumpBytes( tlv.getValue().getData() ) + ", : " + lsee.getMessage() );
                         }
 
                         // We now have to get back to the nearest filter which is not terminal.
@@ -1121,8 +1121,8 @@
                         }
                         catch ( LdapStringEncodingException lsee )
                         {
-                            log.error( "The matching rule (" + StringUtils.dumpBytes( tlv.getValue().getData() ) + ") is invalid" );
-                            throw new DecoderException( "Invalid matching rule " + StringUtils.dumpBytes( tlv.getValue().getData() ) + ", : " + lsee.getMessage() );
+                            log.error( "The matching rule (" + StringTools.dumpBytes( tlv.getValue().getData() ) + ") is invalid" );
+                            throw new DecoderException( "Invalid matching rule " + StringTools.dumpBytes( tlv.getValue().getData() ) + ", : " + lsee.getMessage() );
                         }
                     }
                 });
@@ -1171,8 +1171,8 @@
                         }
                         catch ( LdapStringEncodingException lsee )
                         {
-                            log.error( "The match filter (" + StringUtils.dumpBytes( tlv.getValue().getData() ) + ") is invalid" );
-                            throw new DecoderException( "Invalid match filter " + StringUtils.dumpBytes( tlv.getValue().getData() ) + ", : " + lsee.getMessage() );
+                            log.error( "The match filter (" + StringTools.dumpBytes( tlv.getValue().getData() ) + ") is invalid" );
+                            throw new DecoderException( "Invalid match filter " + StringTools.dumpBytes( tlv.getValue().getData() ) + ", : " + lsee.getMessage() );
                         }
                     }
                 });
@@ -1206,7 +1206,7 @@
 
                         // Store the value.
                         ExtensibleMatchFilter extensibleMatchFilter = (ExtensibleMatchFilter)searchRequest.getCurrentFilter();
-                        extensibleMatchFilter.setMatchValue( StringUtils.utf8ToString( tlv.getValue().getData() ) );
+                        extensibleMatchFilter.setMatchValue( StringTools.utf8ToString( tlv.getValue().getData() ) );
                     }
                 });
                 
@@ -1251,7 +1251,7 @@
                         }
                         catch ( BooleanDecoderException bde )
                         {
-                            log.error("The DN attributes flag " + StringUtils.dumpBytes( value.getData() ) + 
+                            log.error("The DN attributes flag " + StringTools.dumpBytes( value.getData() ) + 
                                     " is invalid : " + bde.getMessage() + ". It should be 0 or 255" );
                         
                             throw new DecoderException( bde.getMessage() );

Modified: directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/LdapControlGrammar.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/LdapControlGrammar.java?rev=359127&r1=359126&r2=359127&view=diff
==============================================================================
--- directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/LdapControlGrammar.java (original)
+++ directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/LdapControlGrammar.java Mon Dec 26 15:31:58 2005
@@ -27,7 +27,6 @@
 import org.apache.asn1new.ber.tlv.Value;
 import org.apache.asn1new.util.BooleanDecoder;
 import org.apache.asn1new.util.BooleanDecoderException;
-import org.apache.asn1.codec.util.StringUtils;
 import org.apache.asn1new.ldap.codec.LdapConstants;
 import org.apache.asn1new.ldap.codec.LdapMessageContainer;
 import org.apache.asn1new.ldap.codec.primitives.LdapString;
@@ -35,6 +34,7 @@
 import org.apache.asn1new.ldap.pojo.Control;
 import org.apache.asn1new.ldap.pojo.LdapMessage;
 import org.apache.asn1new.primitives.OID;
+import org.apache.ldap.common.util.StringTools;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -194,11 +194,11 @@
                         	// The OID is encoded as a String, not an Object Id
                         	try
                         	{
-                        		new OID( StringUtils.utf8ToString( tlv.getValue().getData() ) );
+                        		new OID( StringTools.utf8ToString( tlv.getValue().getData() ) );
                         	}
                         	catch ( DecoderException de )
                         	{
-                                log.error("The control type " + StringUtils.dumpBytes( tlv.getValue().getData() ) + 
+                                log.error("The control type " + StringTools.dumpBytes( tlv.getValue().getData() ) + 
                                         " is not a valid OID : " + de.getMessage() );
                             
                                 throw de;
@@ -210,7 +210,7 @@
                         	}
                         	catch ( LdapStringEncodingException lsee )
                         	{
-                                log.error("The control type " + StringUtils.dumpBytes( tlv.getValue().getData() ) + 
+                                log.error("The control type " + StringTools.dumpBytes( tlv.getValue().getData() ) + 
                                         " is invalid : " + lsee.getMessage() );
                             
                                 throw new DecoderException( lsee.getMessage() );
@@ -269,7 +269,7 @@
                         }
                         catch ( BooleanDecoderException bde )
                         {
-                            log.error("The control criticality flag " + StringUtils.dumpBytes( value.getData() ) + 
+                            log.error("The control criticality flag " + StringTools.dumpBytes( value.getData() ) + 
                                     " is invalid : " + bde.getMessage() + ". It should be 0 or 255" );
                         
                             throw new DecoderException( bde.getMessage() );
@@ -332,7 +332,7 @@
                         
                         if ( log.isDebugEnabled() )
                         {
-                            log.debug( "Control value : " + StringUtils.dumpBytes( control.getControlValue() ) );
+                            log.debug( "Control value : " + StringTools.dumpBytes( control.getControlValue() ) );
                         }
                     }
                 });

Modified: directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/LdapMessageGrammar.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/LdapMessageGrammar.java?rev=359127&r1=359126&r2=359127&view=diff
==============================================================================
--- directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/LdapMessageGrammar.java (original)
+++ directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/LdapMessageGrammar.java Mon Dec 26 15:31:58 2005
@@ -27,10 +27,10 @@
 import org.apache.asn1new.ber.tlv.Value;
 import org.apache.asn1new.util.IntegerDecoder;
 import org.apache.asn1new.util.IntegerDecoderException;
-import org.apache.asn1.codec.util.StringUtils;
 import org.apache.asn1new.ldap.codec.LdapConstants;
 import org.apache.asn1new.ldap.codec.LdapMessageContainer;
 import org.apache.asn1new.ldap.pojo.LdapMessage;
+import org.apache.ldap.common.util.StringTools;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -139,7 +139,7 @@
                         }
                         catch ( IntegerDecoderException ide )
                         {
-                            log.error("The Message Id " + StringUtils.dumpBytes( value.getData() ) + 
+                            log.error("The Message Id " + StringTools.dumpBytes( value.getData() ) + 
                                     " is invalid : " + ide.getMessage() + ". The message ID must be between (0 .. 2 147 483 647)" );
                         
                             throw new DecoderException( ide.getMessage() );

Modified: directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/LdapResultGrammar.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/LdapResultGrammar.java?rev=359127&r1=359126&r2=359127&view=diff
==============================================================================
--- directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/LdapResultGrammar.java (original)
+++ directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/LdapResultGrammar.java Mon Dec 26 15:31:58 2005
@@ -42,7 +42,7 @@
 import org.apache.asn1new.ldap.pojo.LdapResult;
 import org.apache.asn1new.util.IntegerDecoder;
 import org.apache.asn1new.util.IntegerDecoderException;
-import org.apache.asn1.codec.util.StringUtils;
+import org.apache.ldap.common.util.StringTools;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -169,7 +169,7 @@
                         }
                         catch ( IntegerDecoderException ide )
                         {
-                            log.error("The result code " + StringUtils.dumpBytes( value.getData() ) + 
+                            log.error("The result code " + StringTools.dumpBytes( value.getData() ) + 
                                     " is invalid : " + ide.getMessage() + ". The result code must be between (0 .. 90)" );
                         
                             throw new DecoderException( ide.getMessage() );
@@ -284,7 +284,7 @@
                                 }
                                 catch ( InvalidNameException ine )
                                 {
-                                    log.error( "Incorrect DN given : " + StringUtils.dumpBytes( tlv.getValue().getData() ) );
+                                    log.error( "Incorrect DN given : " + StringTools.dumpBytes( tlv.getValue().getData() ) );
                                     throw new DecoderException( "Incorrect DN given : " + ine.getMessage() );
                                 }
                             }
@@ -349,7 +349,7 @@
                             }
                             catch ( LdapStringEncodingException lsee )
                             {
-                                log.error( "The Error Message is invalid : " +StringUtils.dumpBytes( tlv.getValue().getData() ) );
+                                log.error( "The Error Message is invalid : " +StringTools.dumpBytes( tlv.getValue().getData() ) );
                                 ldapResult.setErrorMessage( LdapString.EMPTY_STRING );
                             }
                         }

Modified: directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/ModifyDNRequestGrammar.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/ModifyDNRequestGrammar.java?rev=359127&r1=359126&r2=359127&view=diff
==============================================================================
--- directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/ModifyDNRequestGrammar.java (original)
+++ directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/ModifyDNRequestGrammar.java Mon Dec 26 15:31:58 2005
@@ -29,13 +29,13 @@
 import org.apache.asn1new.ber.tlv.Value;
 import org.apache.asn1new.util.BooleanDecoder;
 import org.apache.asn1new.util.BooleanDecoderException;
-import org.apache.asn1.codec.util.StringUtils;
 import org.apache.asn1new.ldap.codec.LdapConstants;
 import org.apache.asn1new.ldap.codec.LdapMessageContainer;
 import org.apache.asn1new.ldap.codec.primitives.LdapDN;
 import org.apache.asn1new.ldap.codec.primitives.LdapRDN;
 import org.apache.asn1new.ldap.pojo.LdapMessage;
 import org.apache.asn1new.ldap.pojo.ModifyDNRequest;
+import org.apache.ldap.common.util.StringTools;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -149,8 +149,8 @@
                             }
                             catch ( InvalidNameException ine )
                             {
-                                log.error( "The DN to modify  (" + StringUtils.dumpBytes( tlv.getValue().getData() ) + ") is invalid" );
-                                throw new DecoderException( "Invalid DN " + StringUtils.dumpBytes( tlv.getValue().getData() ) + ", : " + ine.getMessage() );
+                                log.error( "The DN to modify  (" + StringTools.dumpBytes( tlv.getValue().getData() ) + ") is invalid" );
+                                throw new DecoderException( "Invalid DN " + StringTools.dumpBytes( tlv.getValue().getData() ) + ", : " + ine.getMessage() );
                             }
                         }
 
@@ -214,8 +214,8 @@
                             }
                             catch ( InvalidNameException ine )
                             {
-                                log.error( "The new RDN (" + StringUtils.dumpBytes( tlv.getValue().getData() ) + ") is invalid" );
-                                throw new DecoderException( "Invalid RDN " + StringUtils.dumpBytes( tlv.getValue().getData() ) + ", : " + ine.getMessage() );
+                                log.error( "The new RDN (" + StringTools.dumpBytes( tlv.getValue().getData() ) + ") is invalid" );
+                                throw new DecoderException( "Invalid RDN " + StringTools.dumpBytes( tlv.getValue().getData() ) + ", : " + ine.getMessage() );
                             }
                         }
 
@@ -271,7 +271,7 @@
                         }
                         catch ( BooleanDecoderException bde )
                         {
-                            log.error("The oldRDN flag " + StringUtils.dumpBytes( value.getData() ) + 
+                            log.error("The oldRDN flag " + StringTools.dumpBytes( value.getData() ) + 
                                     " is invalid : " + bde.getMessage() + ". It should be 0 or 255" );
                         
                             throw new DecoderException( bde.getMessage() );
@@ -353,8 +353,8 @@
                             }
                             catch ( InvalidNameException ine )
                             {
-                                log.error( "The new superior DN (" + StringUtils.dumpBytes( tlv.getValue().getData() ) + ") is invalid" );
-                                throw new DecoderException( "Invalid DN " + StringUtils.dumpBytes( tlv.getValue().getData() ) + ", : " + ine.getMessage() );
+                                log.error( "The new superior DN (" + StringTools.dumpBytes( tlv.getValue().getData() ) + ") is invalid" );
+                                throw new DecoderException( "Invalid DN " + StringTools.dumpBytes( tlv.getValue().getData() ) + ", : " + ine.getMessage() );
                             }
                         }
 

Modified: directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/ModifyRequestGrammar.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/ModifyRequestGrammar.java?rev=359127&r1=359126&r2=359127&view=diff
==============================================================================
--- directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/ModifyRequestGrammar.java (original)
+++ directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/ModifyRequestGrammar.java Mon Dec 26 15:31:58 2005
@@ -28,7 +28,6 @@
 import org.apache.asn1new.ber.tlv.UniversalTag;
 import org.apache.asn1new.util.IntegerDecoder;
 import org.apache.asn1new.util.IntegerDecoderException;
-import org.apache.asn1.codec.util.StringUtils;
 import org.apache.asn1new.ldap.codec.LdapConstants;
 import org.apache.asn1new.ldap.codec.LdapMessageContainer;
 import org.apache.asn1new.ldap.codec.primitives.LdapDN;
@@ -36,6 +35,7 @@
 import org.apache.asn1new.ldap.codec.primitives.LdapStringEncodingException;
 import org.apache.asn1new.ldap.pojo.LdapMessage;
 import org.apache.asn1new.ldap.pojo.ModifyRequest;
+import org.apache.ldap.common.util.StringTools;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -145,7 +145,7 @@
                             }
                             catch ( InvalidNameException ine )
                             {
-                                log.error( "Invalid DN " + StringUtils.dumpBytes( tlv.getValue().getData() ) + ", : " + ine.getMessage() );
+                                log.error( "Invalid DN " + StringTools.dumpBytes( tlv.getValue().getData() ) + ", : " + ine.getMessage() );
                                 throw new DecoderException( "Invalid object DN : " + ine.getMessage() );
                             }
                         }
@@ -272,8 +272,8 @@
                         }
                         catch ( IntegerDecoderException ide )
                         {
-                            log.error( "Invalid operation (" + StringUtils.dumpBytes( tlv.getValue().getData() ) + ", it should be 0, 1 or 2 " );
-                            throw new DecoderException( "Invalid operation (" + StringUtils.dumpBytes( tlv.getValue().getData() ) + ", it should be 0, 1 or 2 " );
+                            log.error( "Invalid operation (" + StringTools.dumpBytes( tlv.getValue().getData() ) + ", it should be 0, 1 or 2 " );
+                            throw new DecoderException( "Invalid operation (" + StringTools.dumpBytes( tlv.getValue().getData() ) + ", it should be 0, 1 or 2 " );
                         }
                         
                         // Store the current operation.
@@ -366,7 +366,7 @@
                             }
                             catch ( LdapStringEncodingException lsee )
                             {
-                                log.error( "Invalid type : " + StringUtils.dumpBytes( tlv.getValue().getData() ) );
+                                log.error( "Invalid type : " + StringTools.dumpBytes( tlv.getValue().getData() ) );
                                 throw new DecoderException( "Invalid type : " + lsee.getMessage() );
                             }
                         }

Modified: directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/SearchRequestGrammar.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/SearchRequestGrammar.java?rev=359127&r1=359126&r2=359127&view=diff
==============================================================================
--- directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/SearchRequestGrammar.java (original)
+++ directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/SearchRequestGrammar.java Mon Dec 26 15:31:58 2005
@@ -31,7 +31,6 @@
 import org.apache.asn1new.util.BooleanDecoderException;
 import org.apache.asn1new.util.IntegerDecoder;
 import org.apache.asn1new.util.IntegerDecoderException;
-import org.apache.asn1.codec.util.StringUtils;
 import org.apache.asn1new.ldap.codec.LdapConstants;
 import org.apache.asn1new.ldap.codec.LdapMessageContainer;
 import org.apache.asn1new.ldap.codec.primitives.LdapDN;
@@ -39,6 +38,7 @@
 import org.apache.asn1new.ldap.codec.primitives.LdapStringEncodingException;
 import org.apache.asn1new.ldap.pojo.LdapMessage;
 import org.apache.asn1new.ldap.pojo.SearchRequest;
+import org.apache.ldap.common.util.StringTools;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -473,7 +473,7 @@
                         }
                         catch ( BooleanDecoderException bde )
                         {
-                            log.error("The types only flag " + StringUtils.dumpBytes( value.getData() ) + 
+                            log.error("The types only flag " + StringTools.dumpBytes( value.getData() ) + 
                                     " is invalid : " + bde.getMessage() + ". It should be 0 or 255" );
                         
                             throw new DecoderException( bde.getMessage() );
@@ -696,7 +696,7 @@
                         }
                         catch ( LdapStringEncodingException lsee )
                         {
-                            log.error( "Cannot decode the attribute description : " + StringUtils.dumpBytes( tlv.getValue().getData() ) );
+                            log.error( "Cannot decode the attribute description : " + StringTools.dumpBytes( tlv.getValue().getData() ) );
                             throw new DecoderException( "Cannot decode the attribute description" );
                         }
                         

Modified: directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/SearchResultEntryGrammar.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/SearchResultEntryGrammar.java?rev=359127&r1=359126&r2=359127&view=diff
==============================================================================
--- directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/SearchResultEntryGrammar.java (original)
+++ directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/SearchResultEntryGrammar.java Mon Dec 26 15:31:58 2005
@@ -26,7 +26,6 @@
 import org.apache.asn1new.ber.grammar.IGrammar;
 import org.apache.asn1new.ber.tlv.TLV;
 import org.apache.asn1new.ber.tlv.UniversalTag;
-import org.apache.asn1.codec.util.StringUtils;
 import org.apache.asn1new.ldap.codec.LdapConstants;
 import org.apache.asn1new.ldap.codec.LdapMessageContainer;
 import org.apache.asn1new.ldap.codec.primitives.LdapDN;
@@ -34,6 +33,7 @@
 import org.apache.asn1new.ldap.codec.primitives.LdapStringEncodingException;
 import org.apache.asn1new.ldap.pojo.LdapMessage;
 import org.apache.asn1new.ldap.pojo.SearchResultEntry;
+import org.apache.ldap.common.util.StringTools;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -154,7 +154,7 @@
                             }
                             catch ( InvalidNameException ine )
                             {
-                                log.error(" The DN " + StringUtils.dumpBytes( tlv.getValue().getData() ) + "is invalid : " + ine.getMessage() );
+                                log.error(" The DN " + StringTools.dumpBytes( tlv.getValue().getData() ) + "is invalid : " + ine.getMessage() );
                                 throw new DecoderException( "The Dn is invalid : " + ine.getMessage() );
                             }
                         }
@@ -275,7 +275,7 @@
                             }
                             catch ( LdapStringEncodingException lsee )
                             {
-                                log.error( "Invalid attribute type : " + StringUtils.dumpBytes( tlv.getValue().getData() ) );
+                                log.error( "Invalid attribute type : " + StringTools.dumpBytes( tlv.getValue().getData() ) );
                                 throw new DecoderException( "The attribute type is invalid : " + lsee.getMessage() );
                             }
                         }
@@ -361,12 +361,12 @@
                                 
                                 if ( log.isDebugEnabled() )
                                 {
-                                    log.debug( "Attribute value " + StringUtils.dumpBytes( (byte[])value ) );
+                                    log.debug( "Attribute value " + StringTools.dumpBytes( (byte[])value ) );
                                 }
                             }
                             else
                             {
-                                value = StringUtils.utf8ToString( tlv.getValue().getData() );
+                                value = StringTools.utf8ToString( tlv.getValue().getData() );
 
                                 if ( log.isDebugEnabled() )
                                 {

Modified: directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/primitives/DNParser.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/primitives/DNParser.java?rev=359127&r1=359126&r2=359127&view=diff
==============================================================================
--- directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/primitives/DNParser.java (original)
+++ directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/primitives/DNParser.java Mon Dec 26 15:31:58 2005
@@ -22,7 +22,8 @@
 import javax.naming.Name;
 
 import org.apache.asn1new.ldap.codec.utils.DNUtils;
-import org.apache.asn1.codec.util.StringUtils;
+import org.apache.ldap.common.util.StringTools;
+
 import javax.naming.NameParser ;
 
 /**
@@ -80,8 +81,8 @@
                 rdns.add( rdn.clone() );
                 rdn.clear();
 
-                if ( ( StringUtils.isCharASCII( chars, pos, ',' ) == false ) &&
-                     ( StringUtils.isCharASCII( chars, pos, ';' ) == false ) )
+                if ( ( StringTools.isCharASCII( chars, pos, ',' ) == false ) &&
+                     ( StringTools.isCharASCII( chars, pos, ';' ) == false ) )
                 {
 
                     break;
@@ -89,8 +90,6 @@
 
                 chars[pos] = ',';
                 pos++;
-
-                //pos = StringUtils.trimLeft( chars, pos );
             }
             while ( ( pos = RDNParser.parse( chars, pos, rdn ) ) != DNUtils.PARSING_ERROR );
         }

Modified: directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/primitives/LdapDN.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/primitives/LdapDN.java?rev=359127&r1=359126&r2=359127&view=diff
==============================================================================
--- directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/primitives/LdapDN.java (original)
+++ directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/primitives/LdapDN.java Mon Dec 26 15:31:58 2005
@@ -19,7 +19,7 @@
 import java.io.UnsupportedEncodingException;
 
 import org.apache.asn1.codec.DecoderException;
-import org.apache.asn1new.util.StringUtils;
+import org.apache.asn1new.util.StringTools;
 
 /**
  * This class parses a DN. 
@@ -96,8 +96,8 @@
             do
             {
 
-                if ( ( StringUtils.isCharASCII( bytes, pos, ',' ) == false ) &&
-                        ( StringUtils.isCharASCII( bytes, pos, ';' ) == false ) )
+                if ( ( StringTools.isCharASCII( bytes, pos, ',' ) == false ) &&
+                        ( StringTools.isCharASCII( bytes, pos, ';' ) == false ) )
                 {
 
                     break;
@@ -118,7 +118,7 @@
             }
             catch ( UnsupportedEncodingException uee )
             {
-                throw new DecoderException( "Bad DN : " + StringUtils.dumpBytes( bytes ) );
+                throw new DecoderException( "Bad DN : " + StringTools.dumpBytes( bytes ) );
             }
             
         }
@@ -140,7 +140,7 @@
 import javax.naming.InvalidNameException;
 import javax.naming.Name;
 
-import org.apache.asn1.codec.util.StringUtils;
+import org.apache.ldap.common.util.StringTools;
 
 /**
  *
@@ -195,7 +195,7 @@
      */
     public LdapDN( String string ) throws InvalidNameException
     {
-        if ( StringUtils.isNotEmpty( string ) )
+        if ( StringTools.isNotEmpty( string ) )
         {
             try
             {

Modified: directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/primitives/LdapRDN.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/primitives/LdapRDN.java?rev=359127&r1=359126&r2=359127&view=diff
==============================================================================
--- directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/primitives/LdapRDN.java (original)
+++ directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/primitives/LdapRDN.java Mon Dec 26 15:31:58 2005
@@ -25,8 +25,8 @@
 
 import javax.naming.InvalidNameException;
 
-import org.apache.asn1.codec.util.StringUtils;
 import org.apache.commons.collections.MultiHashMap;
+import org.apache.ldap.common.util.StringTools;
 
 /**
  * This class store the name-component part or the following BNF grammar (as of RFC2253, par. 3, 
@@ -132,7 +132,7 @@
     {
         super();
         
-        if ( StringUtils.isNotEmpty( rdn ) )
+        if ( StringTools.isNotEmpty( rdn ) )
         {
             try
             {
@@ -210,8 +210,8 @@
             case 1:
                 // We have a single AttributeTypeAndValue
                 // We will trim and lowercase type and value.
-                string = StringUtils.lowerCase( StringUtils.trim( atav.getType() ) ) +
-                                '=' + StringUtils.trim( atav.getValue() );
+                string = StringTools.lowerCase( StringTools.trim( atav.getType() ) ) +
+                                '=' + StringTools.trim( atav.getValue() );
                 break;
                 
             default :
@@ -262,8 +262,8 @@
     public void addAttributeTypeAndValue( String type, String value) throws InvalidNameException
     {
         // First, let's normalize the type
-        String normalizedType = StringUtils.lowerCase( StringUtils.trim( type ) );
-        String normalizedValue = StringUtils.trim( value );
+        String normalizedType = StringTools.lowerCase( StringTools.trim( type ) );
+        String normalizedValue = StringTools.trim( value );
         
         switch ( nbAtavs )
         {
@@ -298,7 +298,7 @@
                     
         }
         
-        if ( StringUtils.isEmpty( string ) )
+        if ( StringTools.isEmpty( string ) )
         {
             string = normalizedType + '=' + normalizedValue;
         }
@@ -316,13 +316,13 @@
      */
     public void removeAttributeTypeAndValue( String type ) throws InvalidNameException
     {
-        if ( StringUtils.isEmpty( type ) )
+        if ( StringTools.isEmpty( type ) )
         {
             return;
         }
         
         // First, let's normalize the type
-        String normalizedType = StringUtils.lowerCase( StringUtils.trim( type ) );
+        String normalizedType = StringTools.lowerCase( StringTools.trim( type ) );
         
         switch ( nbAtavs )
         {
@@ -381,7 +381,7 @@
     public String getValue( String type ) throws InvalidNameException
     {
         // First, let's normalize the type
-        String normalizedType = StringUtils.lowerCase( StringUtils.trim( type ) );
+        String normalizedType = StringTools.lowerCase( StringTools.trim( type ) );
         
         switch ( nbAtavs )
         {
@@ -389,7 +389,7 @@
                 return "";
                 
             case 1:
-                if ( StringUtils.equals( atav.getType(), normalizedType ) )
+                if ( StringTools.equals( atav.getType(), normalizedType ) )
                 {
                     return atav.getValue();
                 }
@@ -439,7 +439,7 @@
     public AttributeTypeAndValue getAttributeTypeAndValue( String type )
     {
         // First, let's normalize the type
-        String normalizedType = StringUtils.lowerCase( StringUtils.trim( type ) );
+        String normalizedType = StringTools.lowerCase( StringTools.trim( type ) );
 
         switch ( nbAtavs )
         {
@@ -558,7 +558,7 @@
                             while ( atavIter1.hasNext() )
                             {
                                 AttributeTypeAndValue atavValue = (AttributeTypeAndValue)atavIter1.next();
-                                atavSet.add( StringUtils.lowerCase( atavValue.getValue() ) );
+                                atavSet.add( StringTools.lowerCase( atavValue.getValue() ) );
                             }
                             
                             Iterator atavIter2 = atavList2.iterator();
@@ -567,9 +567,9 @@
                             {
                                 AttributeTypeAndValue atavValue = (AttributeTypeAndValue)atavIter2.next();
                                 
-                                if ( atavSet.contains( StringUtils.lowerCase( atavValue.getValue() ) ) )
+                                if ( atavSet.contains( StringTools.lowerCase( atavValue.getValue() ) ) )
                                 {
-                                    atavSet.remove( StringUtils.lowerCase( atavValue.getValue() ) );
+                                    atavSet.remove( StringTools.lowerCase( atavValue.getValue() ) );
                                 }
                                 else
                                 {

Modified: directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/primitives/LdapURL.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/primitives/LdapURL.java?rev=359127&r1=359126&r2=359127&view=diff
==============================================================================
--- directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/primitives/LdapURL.java (original)
+++ directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/primitives/LdapURL.java Mon Dec 26 15:31:58 2005
@@ -17,12 +17,12 @@
 package org.apache.asn1new.ldap.codec.primitives;
 
 import org.apache.asn1.codec.DecoderException;
-import org.apache.asn1.codec.util.StringUtils;
 
 import org.apache.commons.httpclient.URIException;
 import org.apache.commons.httpclient.util.URIUtil;
 
 import org.apache.ldap.common.filter.FilterParserImpl;
+import org.apache.ldap.common.util.StringTools;
 
 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
@@ -143,8 +143,8 @@
         int pos = 0;
 
         // The scheme
-        if ( ( ( pos = StringUtils.areEquals( chars, 0, "ldap://" ) ) == StringUtils.NOT_EQUAL )
-             && ( ( pos = StringUtils.areEquals( chars, 0, "ldaps://" ) ) == StringUtils.NOT_EQUAL ) )
+        if ( ( ( pos = StringTools.areEquals( chars, 0, "ldap://" ) ) == StringTools.NOT_EQUAL )
+             && ( ( pos = StringTools.areEquals( chars, 0, "ldaps://" ) ) == StringTools.NOT_EQUAL ) )
         {
             throw new LdapURLEncodingException( "A LdapUrl must start with \"ldap://\" or \"ldaps://\"" );
         }
@@ -165,7 +165,7 @@
         }
 
         // An optional '/'
-        if ( StringUtils.isCharASCII( chars, pos, '/' ) == false )
+        if ( StringTools.isCharASCII( chars, pos, '/' ) == false )
         {
             throw new LdapURLEncodingException( "Bad character, position " + pos + ", '" + chars[pos] +
                 "', '/' expected" );
@@ -190,7 +190,7 @@
         }
 
         // Optionals attributes
-        if ( StringUtils.isCharASCII( chars, pos, '?' ) == false )
+        if ( StringTools.isCharASCII( chars, pos, '?' ) == false )
         {
             throw new LdapURLEncodingException( "Bad character, position " + pos + ", '" + chars[pos] +
                 "', '?' expected" );
@@ -209,7 +209,7 @@
         }
 
         // Optional scope
-        if ( StringUtils.isCharASCII( chars, pos, '?' ) == false )
+        if ( StringTools.isCharASCII( chars, pos, '?' ) == false )
         {
             throw new LdapURLEncodingException( "Bad character, position " + pos + ", '" + chars[pos] +
                 "', '?' expected" );
@@ -228,7 +228,7 @@
         }
 
         // Optional filter
-        if ( StringUtils.isCharASCII( chars, pos, '?' ) == false )
+        if ( StringTools.isCharASCII( chars, pos, '?' ) == false )
         {
             throw new LdapURLEncodingException( "Bad character, position " + pos + ", '" + chars[pos] +
                 "', '?' expected" );
@@ -252,7 +252,7 @@
         }
 
         // Optional extensions
-        if ( StringUtils.isCharASCII( chars, pos, '?' ) == false )
+        if ( StringTools.isCharASCII( chars, pos, '?' ) == false )
         {
             throw new LdapURLEncodingException( "Bad character, position " + pos + ", '" + chars[pos] +
                 "', '?' expected" );
@@ -353,7 +353,7 @@
         // the end.
         // We will search the end of the host part, and we will check some
         // elements.
-        if ( StringUtils.isCharASCII( chars, pos, '-' ) )
+        if ( StringTools.isCharASCII( chars, pos, '-' ) )
         {
 
             // We can't have a '-' on first position
@@ -363,7 +363,7 @@
         while ( ( pos < chars.length ) && ( chars[pos] != ':' ) && ( chars[pos] != '/' ) )
         {
 
-            if ( StringUtils.isCharASCII( chars, pos, '.' ) )
+            if ( StringTools.isCharASCII( chars, pos, '.' ) )
             {
 
                 if ( ( hadMinus ) || ( hadDot ) )
@@ -397,7 +397,7 @@
             else
             {
 
-                if ( hadDot && StringUtils.isCharASCII( chars, pos, '-' ) )
+                if ( hadDot && StringTools.isCharASCII( chars, pos, '-' ) )
                 {
 
                     // We can't have a '-' just after a '.'
@@ -407,7 +407,7 @@
                 hadDot = false;
             }
 
-            if ( StringUtils.isDigit( chars, pos ) )
+            if ( StringTools.isDigit( chars, pos ) )
             {
 
                 if ( isHostNumber && ( nbDots < 4 ) )
@@ -422,11 +422,11 @@
 
                 hadMinus = false;
             }
-            else if ( StringUtils.isAlphaDigitMinus( chars, pos ) )
+            else if ( StringTools.isAlphaDigitMinus( chars, pos ) )
             {
                 isHostNumber = false;
 
-                if ( StringUtils.isCharASCII( chars, pos, '-' ) )
+                if ( StringTools.isCharASCII( chars, pos, '-' ) )
                 {
                     hadMinus = true;
                 }
@@ -495,7 +495,7 @@
     private int parsePort( char[] chars, int pos )
     {
 
-        if ( StringUtils.isDigit( chars, pos ) == false )
+        if ( StringTools.isDigit( chars, pos ) == false )
         {
             return -1;
         }
@@ -504,7 +504,7 @@
 
         pos++;
 
-        while ( StringUtils.isDigit( chars, pos ) )
+        while ( StringTools.isDigit( chars, pos ) )
         {
             port = ( port * 10 ) + ( chars[pos] - '0' );
 
@@ -538,7 +538,7 @@
         }
 
         // We may have a port.
-        if ( StringUtils.isCharASCII( chars, pos, ':' ) )
+        if ( StringTools.isCharASCII( chars, pos, ':' ) )
         {
             pos++;
         }
@@ -611,7 +611,7 @@
             for ( int i = pos; ( i < chars.length ) && ( chars[i] != '?' ); i++ )
             {
 
-                if ( StringUtils.isCharASCII( chars, i, ',' ) )
+                if ( StringTools.isCharASCII( chars, i, ',' ) )
                 {
                     hadComma = true;
 
@@ -747,23 +747,23 @@
     private int parseScope( char[] chars, int pos )
     {
 
-        if ( StringUtils.isCharASCII( chars, pos, 'b' ) ||
-                StringUtils.isCharASCII( chars, pos, 'B' ) )
+        if ( StringTools.isCharASCII( chars, pos, 'b' ) ||
+                StringTools.isCharASCII( chars, pos, 'B' ) )
         {
             pos++;
 
-            if ( StringUtils.isCharASCII( chars, pos, 'a' ) ||
-                    StringUtils.isCharASCII( chars, pos, 'A' ) )
+            if ( StringTools.isCharASCII( chars, pos, 'a' ) ||
+                    StringTools.isCharASCII( chars, pos, 'A' ) )
             {
                 pos++;
 
-                if ( StringUtils.isCharASCII( chars, pos, 's' ) ||
-                        StringUtils.isCharASCII( chars, pos, 'S' ) )
+                if ( StringTools.isCharASCII( chars, pos, 's' ) ||
+                        StringTools.isCharASCII( chars, pos, 'S' ) )
                 {
                     pos++;
 
-                    if ( StringUtils.isCharASCII( chars, pos, 'e' ) ||
-                            StringUtils.isCharASCII( chars, pos, 'E' ) )
+                    if ( StringTools.isCharASCII( chars, pos, 'e' ) ||
+                            StringTools.isCharASCII( chars, pos, 'E' ) )
                     {
                         pos++;
                         scope = SearchControls.OBJECT_SCOPE;
@@ -772,18 +772,18 @@
                 }
             }
         }
-        else if ( StringUtils.isCharASCII( chars, pos, 'o' ) ||
-                StringUtils.isCharASCII( chars, pos, 'O' ) )
+        else if ( StringTools.isCharASCII( chars, pos, 'o' ) ||
+                StringTools.isCharASCII( chars, pos, 'O' ) )
         {
             pos++;
 
-            if ( StringUtils.isCharASCII( chars, pos, 'n' ) ||
-                    StringUtils.isCharASCII( chars, pos, 'N' ) )
+            if ( StringTools.isCharASCII( chars, pos, 'n' ) ||
+                    StringTools.isCharASCII( chars, pos, 'N' ) )
             {
                 pos++;
 
-                if ( StringUtils.isCharASCII( chars, pos, 'e' ) ||
-                        StringUtils.isCharASCII( chars, pos, 'E' ) )
+                if ( StringTools.isCharASCII( chars, pos, 'e' ) ||
+                        StringTools.isCharASCII( chars, pos, 'E' ) )
                 {
                     pos++;
 
@@ -792,18 +792,18 @@
                 }
             }
         }
-        else if ( StringUtils.isCharASCII( chars, pos, 's' ) ||
-                StringUtils.isCharASCII( chars, pos, 'S' ) )
+        else if ( StringTools.isCharASCII( chars, pos, 's' ) ||
+                StringTools.isCharASCII( chars, pos, 'S' ) )
         {
             pos++;
 
-            if ( StringUtils.isCharASCII( chars, pos, 'u' ) ||
-                    StringUtils.isCharASCII( chars, pos, 'U' ) )
+            if ( StringTools.isCharASCII( chars, pos, 'u' ) ||
+                    StringTools.isCharASCII( chars, pos, 'U' ) )
             {
                 pos++;
 
-                if ( StringUtils.isCharASCII( chars, pos, 'b' ) ||
-                        StringUtils.isCharASCII( chars, pos, 'B' ) )
+                if ( StringTools.isCharASCII( chars, pos, 'b' ) ||
+                        StringTools.isCharASCII( chars, pos, 'B' ) )
                 {
                     pos++;
 
@@ -812,7 +812,7 @@
                 }
             }
         }
-        else if ( StringUtils.isCharASCII( chars, pos, '?' ) )
+        else if ( StringTools.isCharASCII( chars, pos, '?' ) )
         {
 
             // An empty scope. This is valid
@@ -855,7 +855,7 @@
             for ( int i = pos; ( i < chars.length ); i++ )
             {
 
-                if ( StringUtils.isCharASCII( chars, i, ',' ) )
+                if ( StringTools.isCharASCII( chars, i, ',' ) )
                 {
 
                     if ( isNewExtension )
@@ -891,7 +891,7 @@
                         value          = null;
                     }
                 }
-                else if ( StringUtils.isCharASCII( chars, i, '=' ) )
+                else if ( StringTools.isCharASCII( chars, i, '=' ) )
                 {
 
                     if ( hasValue )
@@ -916,7 +916,7 @@
                     hasValue       = true;
                     start          = i + 1;
                 }
-                else if ( StringUtils.isCharASCII( chars, i, '!' ) )
+                else if ( StringTools.isCharASCII( chars, i, '!' ) )
                 {
 
                     if ( isNewExtension == false )

Modified: directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/primitives/RDNParser.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/primitives/RDNParser.java?rev=359127&r1=359126&r2=359127&view=diff
==============================================================================
--- directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/primitives/RDNParser.java (original)
+++ directory/shared/ldap/trunk/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/primitives/RDNParser.java Mon Dec 26 15:31:58 2005
@@ -19,7 +19,7 @@
 import javax.naming.InvalidNameException;
 
 import org.apache.asn1new.ldap.codec.utils.DNUtils;
-import org.apache.asn1.codec.util.StringUtils;
+import org.apache.ldap.common.util.StringTools;
 
 /**
  * This class parse the name-component part or the following BNF grammar (as of RFC2253, par. 3, 
@@ -91,7 +91,7 @@
     private static int parseOidValue(char[] chars, int pos)
     {
         // <attributType> ::= [0-9] <digits> <oids>
-        if ( StringUtils.isDigit( chars, pos ) == false )
+        if ( StringTools.isDigit( chars, pos ) == false )
         {
             // Nope... An error
             return DNUtils.PARSING_ERROR;
@@ -101,13 +101,13 @@
             // Let's process an oid
             pos++;
 
-            while ( StringUtils.isDigit( chars, pos ) )
+            while ( StringTools.isDigit( chars, pos ) )
             {
                 pos++;
             }
 
             // <oids> ::= '.' [0-9] <digits> <oids> | e
-            if ( StringUtils.isCharASCII( chars, pos, '.' ) == false )
+            if ( StringTools.isCharASCII( chars, pos, '.' ) == false )
             {
                 return pos;
             }
@@ -117,7 +117,7 @@
                 {
                     pos++;
 
-                    if ( StringUtils.isDigit( chars, pos ) == false )
+                    if ( StringTools.isDigit( chars, pos ) == false )
                     {
                         return DNUtils.PARSING_ERROR;
                     }
@@ -125,13 +125,13 @@
                     {
                         pos++;
 
-                        while ( StringUtils.isDigit( chars, pos ) )
+                        while ( StringTools.isDigit( chars, pos ) )
                         {
                             pos++;
                         }
                     }
                 }
-                while ( StringUtils.isCharASCII( chars, pos, '.' ) );
+                while ( StringTools.isCharASCII( chars, pos, '.' ) );
 
                 return pos;
             }
@@ -150,8 +150,8 @@
      */
     private static int parseOidPrefix( char[] chars, int pos )
     {
-        if ( ( StringUtils.areEquals( chars, pos, DNUtils.OID_LOWER ) == DNUtils.PARSING_ERROR ) &&
-             ( StringUtils.areEquals( chars, pos, DNUtils.OID_UPPER ) == DNUtils.PARSING_ERROR ) )
+        if ( ( StringTools.areEquals( chars, pos, DNUtils.OID_LOWER ) == DNUtils.PARSING_ERROR ) &&
+             ( StringTools.areEquals( chars, pos, DNUtils.OID_UPPER ) == DNUtils.PARSING_ERROR ) )
         {
             return DNUtils.PARSING_ERROR;
         }
@@ -181,7 +181,7 @@
     {
         // <attributType> ::= [a-zA-Z] <keychars> | <oidPrefix> [0-9] <digits> <oids> | [0-9] <digits> <oids>
         
-        if ( StringUtils.isAlphaASCII( chars, pos ))
+        if ( StringTools.isAlphaASCII( chars, pos ))
         {
             // <attributType> ::= [a-zA-Z] <keychars> | <oidPrefix> [0-9] <digits> <oids> 
 
@@ -199,7 +199,7 @@
                 // <keychars>       ::= [a-zA-Z] <keychar> | [0-9] <keychar> | '-' <keychar> | e
                 pos = oldPos + 1;
 
-                while ( StringUtils.isAlphaDigitMinus( chars, pos ) )
+                while ( StringTools.isAlphaDigitMinus( chars, pos ) )
                 {
                     pos++;
                 }
@@ -230,7 +230,7 @@
      */
     private static int parseAttributeValue( char[] chars, int pos )
     {
-        if ( StringUtils.isCharASCII( chars, pos, '#' ) )
+        if ( StringTools.isCharASCII( chars, pos, '#' ) )
         {
             pos++;
 
@@ -241,9 +241,9 @@
                 return DNUtils.PARSING_ERROR;
             }
 
-            return StringUtils.trimLeft( chars, pos );
+            return StringTools.trimLeft( chars, pos );
         }
-        else if ( StringUtils.isCharASCII( chars, pos, '"' ) )
+        else if ( StringTools.isCharASCII( chars, pos, '"' ) )
         {
             pos++;
             int nbBytes = 0;
@@ -252,7 +252,7 @@
             // <quotechar-or-pairs>    ::= <quotechar> <quotechar-or-pairs> | '\' <pairchar> <quotechar-or-pairs> | e
             while ( true )
             {
-                if ( StringUtils.isCharASCII( chars, pos, '\\' ) )
+                if ( StringTools.isCharASCII( chars, pos, '\\' ) )
                 {
                     pos++;
 
@@ -275,11 +275,11 @@
                 }
             }
 
-            if ( StringUtils.isCharASCII( chars, pos, '"' ) )
+            if ( StringTools.isCharASCII( chars, pos, '"' ) )
             {
                 pos++;
 
-                return StringUtils.trimLeft( chars, pos );
+                return StringTools.trimLeft( chars, pos );
             }
             else
             {
@@ -290,7 +290,7 @@
         {
             while ( true )
             {
-                if ( StringUtils.isCharASCII( chars, pos, '\\' ) )
+                if ( StringTools.isCharASCII( chars, pos, '\\' ) )
                 {
                     // '\' <pairchar> <pairs-or-strings>
                     pos++;
@@ -313,12 +313,12 @@
                     {
                         // A special case : if we have some spaces before the '+' character,
                         // we MUST skip them.
-                        if ( StringUtils.isCharASCII( chars, pos, ' ') )
+                        if ( StringTools.isCharASCII( chars, pos, ' ') )
                         {
-                            pos = StringUtils.trimLeft( chars, pos );
+                            pos = StringTools.trimLeft( chars, pos );
 
                             if ( ( DNUtils.isStringChar( chars, pos ) == DNUtils.PARSING_ERROR ) &&
-                                    ( StringUtils.isCharASCII( chars, pos, '\\' ) == false ) )
+                                    ( StringTools.isCharASCII( chars, pos, '\\' ) == false ) )
                             {
                                 // Ok, we are done with the stringchar.
                                 return pos;
@@ -357,9 +357,9 @@
 
         while ( true )
         {
-            pos = StringUtils.trimLeft( chars, pos );
+            pos = StringTools.trimLeft( chars, pos );
 
-            if ( StringUtils.isCharASCII( chars, pos, '+' ) )
+            if ( StringTools.isCharASCII( chars, pos, '+' ) )
             {
                 pos++;
             }
@@ -369,7 +369,7 @@
                 return pos;
             }
 
-            pos = StringUtils.trimLeft( chars, pos );
+            pos = StringTools.trimLeft( chars, pos );
 
             if ( ( newPos = parseAttributeType( chars, pos ) ) == DNUtils.PARSING_ERROR )
             {
@@ -381,9 +381,9 @@
                 type = new String( chars, pos, newPos - pos );
             }
 
-            pos = StringUtils.trimLeft( chars, newPos );
+            pos = StringTools.trimLeft( chars, newPos );
 
-            if ( StringUtils.isCharASCII( chars, pos, '=' ) )
+            if ( StringTools.isCharASCII( chars, pos, '=' ) )
             {
                 pos++;
             }
@@ -392,7 +392,7 @@
                 return DNUtils.PARSING_ERROR;
             }
 
-            pos = StringUtils.trimLeft( chars, pos );
+            pos = StringTools.trimLeft( chars, pos );
 
             newPos = parseAttributeValue( chars, pos );
             
@@ -400,7 +400,7 @@
             {
                 if ( rdn != null )
                 {
-                    newPos = StringUtils.trimRight( chars, newPos );
+                    newPos = StringTools.trimRight( chars, newPos );
                     value = new String( chars, pos, newPos - pos );
                     
                     rdn.addAttributeTypeAndValue( type, value );
@@ -427,7 +427,7 @@
         String type = null;
         String value = null;
         
-        pos = StringUtils.trimLeft( chars, pos );
+        pos = StringTools.trimLeft( chars, pos );
         
         if ( ( newPos = parseAttributeType( chars, pos ) ) == DNUtils.PARSING_ERROR )
         {
@@ -439,9 +439,9 @@
             type = new String( chars, pos, newPos - pos );
         }
         
-        pos = StringUtils.trimLeft( chars, newPos );
+        pos = StringTools.trimLeft( chars, newPos );
 
-        if ( StringUtils.isCharASCII( chars, pos, '=' ) == false )
+        if ( StringTools.isCharASCII( chars, pos, '=' ) == false )
         {
             return DNUtils.PARSING_ERROR;
         }
@@ -450,7 +450,7 @@
             pos++;
         }
 
-        pos = StringUtils.trimLeft( chars, pos );
+        pos = StringTools.trimLeft( chars, pos );
 
         if ( ( newPos = parseAttributeValue( chars, pos ) ) == DNUtils.PARSING_ERROR )
         {
@@ -459,7 +459,7 @@
         
         if ( rdn != null )
         {
-            newPos = StringUtils.trimRight( chars, newPos );
+            newPos = StringTools.trimRight( chars, newPos );
             value = new String( chars, pos, newPos - pos );
             
             rdn.addAttributeTypeAndValue( type, value );



Mime
View raw message