You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2005/12/27 01:34:25 UTC

svn commit: r359146 [1/2] - in /directory/shared/ldap/branches/DN-refactoring/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/asn1ne...

Author: elecharny
Date: Mon Dec 26 16:33:37 2005
New Revision: 359146

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

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

Modified: directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/TwixDecoder.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/TwixDecoder.java?rev=359146&r1=359145&r2=359146&view=diff
==============================================================================
--- directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/TwixDecoder.java (original)
+++ directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/TwixDecoder.java Mon Dec 26 16:33:37 2005
@@ -11,10 +11,10 @@
 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 +77,7 @@
     		
     		if (buf.hasArray()) 
     		{
-    			log.debug( StringUtils.dumpBytes( buf.array() ) );
+    			log.debug( StringTools.dumpBytes( buf.array() ) );
     		}
     		else
     		{
@@ -90,7 +90,7 @@
     			}
     			
     			buf.flip();
-    			log.debug( StringUtils.dumpBytes( array ) );
+    			log.debug( StringTools.dumpBytes( array ) );
     		}
     	}
     	

Modified: directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/TwixEncoder.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/TwixEncoder.java?rev=359146&r1=359145&r2=359146&view=diff
==============================================================================
--- directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/TwixEncoder.java (original)
+++ directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/TwixEncoder.java Mon Dec 26 16:33:37 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/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/LdapMessageContainer.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/LdapMessageContainer.java?rev=359146&r1=359145&r2=359146&view=diff
==============================================================================
--- directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/LdapMessageContainer.java (original)
+++ directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/LdapMessageContainer.java Mon Dec 26 16:33:37 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/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/AbandonRequestGrammar.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/AbandonRequestGrammar.java?rev=359146&r1=359145&r2=359146&view=diff
==============================================================================
--- directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/AbandonRequestGrammar.java (original)
+++ directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/AbandonRequestGrammar.java Mon Dec 26 16:33:37 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/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/AddRequestGrammar.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/AddRequestGrammar.java?rev=359146&r1=359145&r2=359146&view=diff
==============================================================================
--- directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/AddRequestGrammar.java (original)
+++ directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/AddRequestGrammar.java Mon Dec 26 16:33:37 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.pojo.AddRequest;
@@ -34,6 +33,7 @@
 import org.apache.ldap.common.LdapString;
 import org.apache.ldap.common.LdapStringEncodingException;
 import org.apache.ldap.common.name.LdapDN;
+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/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/BindRequestGrammar.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/BindRequestGrammar.java?rev=359146&r1=359145&r2=359146&view=diff
==============================================================================
--- directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/BindRequestGrammar.java (original)
+++ directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/BindRequestGrammar.java Mon Dec 26 16:33:37 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.pojo.BindRequest;
@@ -40,6 +38,7 @@
 import org.apache.ldap.common.LdapString;
 import org.apache.ldap.common.LdapStringEncodingException;
 import org.apache.ldap.common.name.LdapDN;
+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/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/CompareRequestGrammar.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/CompareRequestGrammar.java?rev=359146&r1=359145&r2=359146&view=diff
==============================================================================
--- directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/CompareRequestGrammar.java (original)
+++ directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/CompareRequestGrammar.java Mon Dec 26 16:33:37 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.pojo.CompareRequest;
@@ -34,6 +33,7 @@
 import org.apache.ldap.common.LdapString;
 import org.apache.ldap.common.LdapStringEncodingException;
 import org.apache.ldap.common.name.LdapDN;
+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/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/DelRequestGrammar.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/DelRequestGrammar.java?rev=359146&r1=359145&r2=359146&view=diff
==============================================================================
--- directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/DelRequestGrammar.java (original)
+++ directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/DelRequestGrammar.java Mon Dec 26 16:33:37 2005
@@ -29,8 +29,8 @@
 import org.apache.asn1new.ldap.codec.LdapMessageContainer;
 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.name.LdapDN;
+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/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/FilterGrammar.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/FilterGrammar.java?rev=359146&r1=359145&r2=359146&view=diff
==============================================================================
--- directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/FilterGrammar.java (original)
+++ directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/FilterGrammar.java Mon Dec 26 16:33:37 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.pojo.AttributeValueAssertion;
@@ -44,6 +43,7 @@
 import org.apache.asn1new.ldap.pojo.filters.SubstringFilter;
 import org.apache.ldap.common.LdapString;
 import org.apache.ldap.common.LdapStringEncodingException;
+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/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/LdapControlGrammar.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/LdapControlGrammar.java?rev=359146&r1=359145&r2=359146&view=diff
==============================================================================
--- directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/LdapControlGrammar.java (original)
+++ directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/LdapControlGrammar.java Mon Dec 26 16:33:37 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.pojo.Control;
@@ -35,6 +34,7 @@
 import org.apache.asn1new.primitives.OID;
 import org.apache.ldap.common.LdapString;
 import org.apache.ldap.common.LdapStringEncodingException;
+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/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/LdapMessageGrammar.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/LdapMessageGrammar.java?rev=359146&r1=359145&r2=359146&view=diff
==============================================================================
--- directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/LdapMessageGrammar.java (original)
+++ directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/LdapMessageGrammar.java Mon Dec 26 16:33:37 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/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/LdapResultGrammar.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/LdapResultGrammar.java?rev=359146&r1=359145&r2=359146&view=diff
==============================================================================
--- directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/LdapResultGrammar.java (original)
+++ directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/LdapResultGrammar.java Mon Dec 26 16:33:37 2005
@@ -37,12 +37,12 @@
 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.LdapString;
 import org.apache.ldap.common.LdapStringEncodingException;
 import org.apache.ldap.common.name.LdapDN;
 import org.apache.ldap.common.url.LdapURL;
 import org.apache.ldap.common.url.LdapURLEncodingException;
+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/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/ModifyDNRequestGrammar.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/ModifyDNRequestGrammar.java?rev=359146&r1=359145&r2=359146&view=diff
==============================================================================
--- directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/ModifyDNRequestGrammar.java (original)
+++ directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/ModifyDNRequestGrammar.java Mon Dec 26 16:33:37 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.pojo.LdapMessage;
 import org.apache.asn1new.ldap.pojo.ModifyDNRequest;
 import org.apache.ldap.common.name.LdapDN;
 import org.apache.ldap.common.name.Rdn;
+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/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/ModifyRequestGrammar.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/ModifyRequestGrammar.java?rev=359146&r1=359145&r2=359146&view=diff
==============================================================================
--- directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/ModifyRequestGrammar.java (original)
+++ directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/ModifyRequestGrammar.java Mon Dec 26 16:33:37 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.pojo.LdapMessage;
@@ -36,6 +35,7 @@
 import org.apache.ldap.common.LdapString;
 import org.apache.ldap.common.LdapStringEncodingException;
 import org.apache.ldap.common.name.LdapDN;
+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/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/SearchRequestGrammar.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/SearchRequestGrammar.java?rev=359146&r1=359145&r2=359146&view=diff
==============================================================================
--- directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/SearchRequestGrammar.java (original)
+++ directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/SearchRequestGrammar.java Mon Dec 26 16:33:37 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.pojo.LdapMessage;
@@ -39,6 +38,7 @@
 import org.apache.ldap.common.LdapString;
 import org.apache.ldap.common.LdapStringEncodingException;
 import org.apache.ldap.common.name.LdapDN;
+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/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/SearchResultEntryGrammar.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/SearchResultEntryGrammar.java?rev=359146&r1=359145&r2=359146&view=diff
==============================================================================
--- directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/SearchResultEntryGrammar.java (original)
+++ directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/codec/grammar/SearchResultEntryGrammar.java Mon Dec 26 16:33:37 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.pojo.LdapMessage;
@@ -34,6 +33,7 @@
 import org.apache.ldap.common.LdapString;
 import org.apache.ldap.common.LdapStringEncodingException;
 import org.apache.ldap.common.name.LdapDN;
+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/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/AddRequest.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/AddRequest.java?rev=359146&r1=359145&r2=359146&view=diff
==============================================================================
--- directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/AddRequest.java (original)
+++ directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/AddRequest.java Mon Dec 26 16:33:37 2005
@@ -20,11 +20,11 @@
 import org.apache.asn1new.ber.tlv.Length;
 import org.apache.asn1new.ber.tlv.UniversalTag;
 import org.apache.asn1new.ber.tlv.Value;
-import org.apache.asn1.codec.util.StringUtils;
 import org.apache.asn1new.ldap.codec.LdapConstants;
 import org.apache.ldap.common.LdapString;
 import org.apache.ldap.common.name.LdapDN;
 import org.apache.ldap.common.util.AttributeUtils;
+import org.apache.ldap.common.util.StringTools;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -247,7 +247,7 @@
                             
                             if ( value instanceof String )
                             {
-                                int valueLength = StringUtils.getBytesUtf8( (String)value ).length;
+                                int valueLength = StringTools.getBytesUtf8( (String)value ).length;
                                 localValuesLength += 1 + Length.getNbBytes( valueLength ) + valueLength;
                             }
                             else
@@ -395,7 +395,7 @@
 
         if ( log.isDebugEnabled() )
         {
-            log.debug( "AddRequest encoding : " + StringUtils.dumpBytes( buffer.array() ) );
+            log.debug( "AddRequest encoding : " + StringTools.dumpBytes( buffer.array() ) );
             log.debug( "AddRequest initial value : " + toString() );
         }
         

Modified: directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/BindRequest.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/BindRequest.java?rev=359146&r1=359145&r2=359146&view=diff
==============================================================================
--- directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/BindRequest.java (original)
+++ directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/BindRequest.java Mon Dec 26 16:33:37 2005
@@ -23,8 +23,8 @@
 import org.apache.asn1new.ber.tlv.Length;
 import org.apache.asn1new.ber.tlv.Value;
 import org.apache.asn1new.ldap.codec.LdapConstants;
-import org.apache.asn1.codec.util.StringUtils;
 import org.apache.ldap.common.name.LdapDN;
+import org.apache.ldap.common.util.StringTools;
 
 
 /**
@@ -256,7 +256,7 @@
         sb.append( "    BindRequest\n" );
         sb.append( "        Version : '" ).append( version ).append( "'\n" );
         
-        if ( StringUtils.isEmpty( name.toString() ) )
+        if ( StringTools.isEmpty( name.toString() ) )
         {
             sb.append( "        Name : anonymous\n" );
         }

Modified: directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/CompareRequest.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/CompareRequest.java?rev=359146&r1=359145&r2=359146&view=diff
==============================================================================
--- directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/CompareRequest.java (original)
+++ directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/CompareRequest.java Mon Dec 26 16:33:37 2005
@@ -24,9 +24,9 @@
 import org.apache.asn1new.ber.tlv.UniversalTag;
 import org.apache.asn1new.ber.tlv.Value;
 import org.apache.asn1new.ldap.codec.LdapConstants;
-import org.apache.asn1.codec.util.StringUtils;
 import org.apache.ldap.common.LdapString;
 import org.apache.ldap.common.name.LdapDN;
+import org.apache.ldap.common.util.StringTools;
 
 
 /**
@@ -179,7 +179,7 @@
         
         if ( assertionValue instanceof String )
         {
-            int assertionValueLength = StringUtils.getBytesUtf8( (String)assertionValue ).length;
+            int assertionValueLength = StringTools.getBytesUtf8( (String)assertionValue ).length;
             avaLength +=
                 1 + Length.getNbBytes( assertionValueLength ) + assertionValueLength;
         }

Modified: directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/Control.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/Control.java?rev=359146&r1=359145&r2=359146&view=diff
==============================================================================
--- directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/Control.java (original)
+++ directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/Control.java Mon Dec 26 16:33:37 2005
@@ -24,8 +24,8 @@
 import org.apache.asn1new.ber.tlv.Length;
 import org.apache.asn1new.ber.tlv.UniversalTag;
 import org.apache.asn1new.ber.tlv.Value;
-import org.apache.asn1.codec.util.StringUtils;
 import org.apache.ldap.common.LdapString;
+import org.apache.ldap.common.util.StringTools;
 
 
 /**
@@ -86,7 +86,7 @@
         }
         else if ( controlValue instanceof String )
         {
-            return StringUtils.getBytesUtf8( (String)controlValue );
+            return StringTools.getBytesUtf8( (String)controlValue );
         }
         else
         {
@@ -226,7 +226,7 @@
         	}
         	else
         	{
-                sb.append("        Control value : '").append( StringUtils.dumpBytes( (byte[])controlValue ) ).append("'\n");
+                sb.append("        Control value : '").append( StringTools.dumpBytes( (byte[])controlValue ) ).append("'\n");
         	}
         	
         }

Modified: directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/ExtendedResponse.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/ExtendedResponse.java?rev=359146&r1=359145&r2=359146&view=diff
==============================================================================
--- directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/ExtendedResponse.java (original)
+++ directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/ExtendedResponse.java Mon Dec 26 16:33:37 2005
@@ -22,8 +22,8 @@
 import org.apache.asn1.codec.EncoderException;
 import org.apache.asn1new.ber.tlv.Length;
 import org.apache.asn1new.primitives.OID;
-import org.apache.asn1.codec.util.StringUtils;
 import org.apache.asn1new.ldap.codec.LdapConstants;
+import org.apache.ldap.common.util.StringTools;
 
 
 /**
@@ -142,7 +142,7 @@
             {
                 if ( response instanceof String )
                 {
-                    int responseLength = StringUtils.getBytesUtf8( (String)response ).length; 
+                    int responseLength = StringTools.getBytesUtf8( (String)response ).length; 
                     extendedResponseLength += 1 + Length.getNbBytes( responseLength ) + responseLength;
                 }
                 else
@@ -202,7 +202,7 @@
                 
                 if ( response instanceof String )
                 {
-                    byte[] responseBytes = StringUtils.getBytesUtf8( (String)response );
+                    byte[] responseBytes = StringTools.getBytesUtf8( (String)response );
                     buffer.put( Length.getBytes( responseBytes.length ) );
                     
                     if ( responseBytes.length != 0 )

Modified: directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/ModifyDNRequest.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/ModifyDNRequest.java?rev=359146&r1=359145&r2=359146&view=diff
==============================================================================
--- directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/ModifyDNRequest.java (original)
+++ directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/ModifyDNRequest.java Mon Dec 26 16:33:37 2005
@@ -20,12 +20,12 @@
 import java.nio.ByteBuffer;
 
 import org.apache.asn1.codec.EncoderException;
-import org.apache.asn1.codec.util.StringUtils;
 import org.apache.asn1new.ber.tlv.Length;
 import org.apache.asn1new.ber.tlv.Value;
 import org.apache.asn1new.ldap.codec.LdapConstants;
 import org.apache.ldap.common.name.LdapDN;
 import org.apache.ldap.common.name.Rdn;
+import org.apache.ldap.common.util.StringTools;
 
 /**
  * A ModifyDNRequest Message. Its syntax is :
@@ -178,7 +178,7 @@
     */
     public int computeLength()
     {
-    	int newRdnlength = StringUtils.getBytesUtf8( newRDN.toString() ).length;
+    	int newRdnlength = StringTools.getBytesUtf8( newRDN.toString() ).length;
         modifyDNRequestLength =
             1 + Length.getNbBytes( entry.getNbBytes() ) + entry.getNbBytes() +
             1 + Length.getNbBytes( newRdnlength ) + newRdnlength +

Modified: directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/ModifyRequest.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/ModifyRequest.java?rev=359146&r1=359145&r2=359146&view=diff
==============================================================================
--- directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/ModifyRequest.java (original)
+++ directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/ModifyRequest.java Mon Dec 26 16:33:37 2005
@@ -20,10 +20,10 @@
 import org.apache.asn1new.ber.tlv.Length;
 import org.apache.asn1new.ber.tlv.UniversalTag;
 import org.apache.asn1new.ber.tlv.Value;
-import org.apache.asn1.codec.util.StringUtils;
 import org.apache.asn1new.ldap.codec.LdapConstants;
 import org.apache.ldap.common.LdapString;
 import org.apache.ldap.common.name.LdapDN;
+import org.apache.ldap.common.util.StringTools;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -159,7 +159,7 @@
      */
     public void addAttributeTypeAndValues( LdapString type )
     {
-        currentAttribute = new BasicAttribute( StringUtils.lowerCase( type.getString() ) );
+        currentAttribute = new BasicAttribute( StringTools.lowerCase( type.getString() ) );
 
         int operation = 0;
 
@@ -316,7 +316,7 @@
                             
                             if ( value instanceof String )
                             {
-                                int valueLength = StringUtils.getBytesUtf8( (String)value ).length;
+                                int valueLength = StringTools.getBytesUtf8( (String)value ).length;
                                 localValuesLength += 1 + Length.getNbBytes( valueLength ) + valueLength;
                             }
                             else
@@ -550,7 +550,7 @@
                         
                         if ( attributeValue instanceof String )
                         {
-                            sb.append( StringUtils.utf8ToString( (byte[])attributeValue ) ).append( "' \n" );
+                            sb.append( StringTools.utf8ToString( (byte[])attributeValue ) ).append( "' \n" );
                         }
                         else
                         {

Modified: directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/SearchRequest.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/SearchRequest.java?rev=359146&r1=359145&r2=359146&view=diff
==============================================================================
--- directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/SearchRequest.java (original)
+++ directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/SearchRequest.java Mon Dec 26 16:33:37 2005
@@ -22,9 +22,9 @@
 import org.apache.asn1new.ber.tlv.Value;
 import org.apache.asn1new.ldap.codec.LdapConstants;
 import org.apache.asn1new.ldap.pojo.filters.Filter;
-import org.apache.asn1.codec.util.StringUtils;
 import org.apache.ldap.common.LdapString;
 import org.apache.ldap.common.name.LdapDN;
+import org.apache.ldap.common.util.StringTools;
 
 import java.io.UnsupportedEncodingException;
 import java.nio.BufferOverflowException;
@@ -126,7 +126,7 @@
      */
     public void addAttribute( LdapString attribute )
     {
-        attributes.put( new BasicAttribute( StringUtils.lowerCase( attribute.getString() ) ) );
+        attributes.put( new BasicAttribute( StringTools.lowerCase( attribute.getString() ) ) );
     }
 
     /**

Modified: directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/SearchResultEntry.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/SearchResultEntry.java?rev=359146&r1=359145&r2=359146&view=diff
==============================================================================
--- directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/SearchResultEntry.java (original)
+++ directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/SearchResultEntry.java Mon Dec 26 16:33:37 2005
@@ -20,11 +20,11 @@
 import org.apache.asn1new.ber.tlv.Length;
 import org.apache.asn1new.ber.tlv.UniversalTag;
 import org.apache.asn1new.ber.tlv.Value;
-import org.apache.asn1.codec.util.StringUtils;
 import org.apache.asn1new.ldap.codec.LdapConstants;
 import org.apache.ldap.common.LdapString;
 import org.apache.ldap.common.name.LdapDN;
 import org.apache.ldap.common.util.AttributeUtils;
+import org.apache.ldap.common.util.StringTools;
 
 import java.nio.BufferOverflowException;
 import java.nio.ByteBuffer;
@@ -166,7 +166,7 @@
      */
     public void addAttributeValues( LdapString type )
     {
-        currentAttributeValue = new BasicAttribute( StringUtils.lowerCase( type.getString() ) );
+        currentAttributeValue = new BasicAttribute( StringTools.lowerCase( type.getString() ) );
 
         partialAttributeList.put( currentAttributeValue );
     }
@@ -262,7 +262,7 @@
 		                    {
 		                    	String stringValue = (String)value;
                                 
-                                int stringLength = StringUtils.getBytesUtf8( stringValue ).length;
+                                int stringLength = StringTools.getBytesUtf8( stringValue ).length;
                                 localValuesLength += 1 + Length.getNbBytes( stringLength ) + stringLength;
 		                    }
 		                    else

Modified: directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/filters/AttributeValueAssertionFilter.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/filters/AttributeValueAssertionFilter.java?rev=359146&r1=359145&r2=359146&view=diff
==============================================================================
--- directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/filters/AttributeValueAssertionFilter.java (original)
+++ directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/filters/AttributeValueAssertionFilter.java Mon Dec 26 16:33:37 2005
@@ -24,7 +24,7 @@
 import org.apache.asn1new.ber.tlv.Value;
 import org.apache.asn1new.ldap.codec.LdapConstants;
 import org.apache.asn1new.ldap.pojo.AttributeValueAssertion;
-import org.apache.asn1.codec.util.StringUtils;
+import org.apache.ldap.common.util.StringTools;
 
 
 /**
@@ -132,7 +132,7 @@
         
         if ( assertionValue instanceof String )  
         {
-            assertionValueLength = StringUtils.getBytesUtf8( (String)assertionValue ).length;
+            assertionValueLength = StringTools.getBytesUtf8( (String)assertionValue ).length;
         }
         else
         {

Modified: directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/filters/ExtensibleMatchFilter.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/filters/ExtensibleMatchFilter.java?rev=359146&r1=359145&r2=359146&view=diff
==============================================================================
--- directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/filters/ExtensibleMatchFilter.java (original)
+++ directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/main/java/org/apache/asn1new/ldap/pojo/filters/ExtensibleMatchFilter.java Mon Dec 26 16:33:37 2005
@@ -24,8 +24,8 @@
 import org.apache.asn1new.ber.tlv.UniversalTag;
 import org.apache.asn1new.ber.tlv.Value;
 import org.apache.asn1new.ldap.codec.LdapConstants;
-import org.apache.asn1.codec.util.StringUtils;
 import org.apache.ldap.common.LdapString;
+import org.apache.ldap.common.util.StringTools;
 
 
 /**
@@ -203,7 +203,7 @@
         {
             if ( matchValue instanceof String )
             {
-                int matchValueLength = StringUtils.getBytesUtf8( (String)matchValue ).length; 
+                int matchValueLength = StringTools.getBytesUtf8( (String)matchValue ).length; 
                 matchingRuleAssertionLength += 1 + Length.getNbBytes( matchValueLength ) + matchValueLength; 
             }
             else
@@ -287,7 +287,7 @@
 
                 if ( matchValue instanceof String )
                 {
-                    byte[] matchValueBytes = StringUtils.getBytesUtf8( (String)matchValue ); 
+                    byte[] matchValueBytes = StringTools.getBytesUtf8( (String)matchValue ); 
                     buffer.put( Length.getBytes( matchValueBytes.length ) );
                     
                     if ( matchValueBytes.length != 0 )

Modified: directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/test/org/apache/asn1new/ldap/codec/AbandonRequestTest.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/test/org/apache/asn1new/ldap/codec/AbandonRequestTest.java?rev=359146&r1=359145&r2=359146&view=diff
==============================================================================
--- directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/test/org/apache/asn1new/ldap/codec/AbandonRequestTest.java (original)
+++ directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/test/org/apache/asn1new/ldap/codec/AbandonRequestTest.java Mon Dec 26 16:33:37 2005
@@ -24,7 +24,7 @@
 import org.apache.asn1new.ber.containers.IAsn1Container;
 import org.apache.asn1new.ldap.pojo.AbandonRequest;
 import org.apache.asn1new.ldap.pojo.LdapMessage;
-import org.apache.asn1.codec.util.StringUtils;
+import org.apache.ldap.common.util.StringTools;
 
 import junit.framework.Assert;
 import junit.framework.TestCase;
@@ -52,7 +52,7 @@
 									// AbandonRequest ::= [APPLICATION 16] MessageID
             } );
 
-        String decodedPdu = StringUtils.dumpBytes( stream.array() );
+        String decodedPdu = StringTools.dumpBytes( stream.array() );
         stream.flip();
 
         // Allocate a LdapMessageContainer Container
@@ -84,7 +84,7 @@
         {
             ByteBuffer bb = message.encode( null );
             
-            String encodedPdu = StringUtils.dumpBytes( bb.array() ); 
+            String encodedPdu = StringTools.dumpBytes( bb.array() ); 
             
             Assert.assertEquals(encodedPdu, decodedPdu );
         }
@@ -130,7 +130,7 @@
                 0x04, 0x0D, '1', '.', '3', '.', '6', '.', '1', '.', '5', '.', '5', '.', '4'
             } );
 
-        String decodedPdu = StringUtils.dumpBytes( stream.array() );
+        String decodedPdu = StringTools.dumpBytes( stream.array() );
         stream.flip();
 
         // Allocate a LdapMessageContainer Container
@@ -162,7 +162,7 @@
         {
             ByteBuffer bb = message.encode( null );
             
-            String encodedPdu = StringUtils.dumpBytes( bb.array() ); 
+            String encodedPdu = StringTools.dumpBytes( bb.array() ); 
             
             Assert.assertEquals(encodedPdu, decodedPdu );
         }
@@ -190,7 +190,7 @@
                                     // AbandonRequest ::= [APPLICATION 16] MessageID
             } );
 
-        String decodedPdu = StringUtils.dumpBytes( stream.array() );
+        String decodedPdu = StringTools.dumpBytes( stream.array() );
         stream.flip();
 
         // Allocate a LdapMessageContainer Container
@@ -222,7 +222,7 @@
         {
             ByteBuffer bb = message.encode( null );
             
-            String encodedPdu = StringUtils.dumpBytes( bb.array() ); 
+            String encodedPdu = StringTools.dumpBytes( bb.array() ); 
             
             Assert.assertEquals(encodedPdu, decodedPdu );
         }

Modified: directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/test/org/apache/asn1new/ldap/codec/AddRequestTest.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/test/org/apache/asn1new/ldap/codec/AddRequestTest.java?rev=359146&r1=359145&r2=359146&view=diff
==============================================================================
--- directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/test/org/apache/asn1new/ldap/codec/AddRequestTest.java (original)
+++ directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/test/org/apache/asn1new/ldap/codec/AddRequestTest.java Mon Dec 26 16:33:37 2005
@@ -31,7 +31,7 @@
 import org.apache.asn1new.ber.containers.IAsn1Container;
 import org.apache.asn1new.ldap.pojo.AddRequest;
 import org.apache.asn1new.ldap.pojo.LdapMessage;
-import org.apache.asn1.codec.util.StringUtils;
+import org.apache.ldap.common.util.StringTools;
 
 import junit.framework.Assert;
 import junit.framework.TestCase;
@@ -76,7 +76,7 @@
                 0x04, 0x05, 't', 'e', 's', 't', '3',
             } );
 
-        String decodedPdu = StringUtils.dumpBytes( stream.array() );
+        String decodedPdu = StringTools.dumpBytes( stream.array() );
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -161,7 +161,7 @@
         {
             ByteBuffer bb = message.encode( null );
             
-            String encodedPdu = StringUtils.dumpBytes( bb.array() ); 
+            String encodedPdu = StringTools.dumpBytes( bb.array() ); 
             
             Assert.assertEquals(encodedPdu, decodedPdu );
         }

Modified: directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/test/org/apache/asn1new/ldap/codec/AddResponseTest.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/test/org/apache/asn1new/ldap/codec/AddResponseTest.java?rev=359146&r1=359145&r2=359146&view=diff
==============================================================================
--- directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/test/org/apache/asn1new/ldap/codec/AddResponseTest.java (original)
+++ directory/shared/ldap/branches/DN-refactoring/apache2-provider/src/test/org/apache/asn1new/ldap/codec/AddResponseTest.java Mon Dec 26 16:33:37 2005
@@ -24,7 +24,7 @@
 import org.apache.asn1new.ber.containers.IAsn1Container;
 import org.apache.asn1new.ldap.pojo.AddResponse;
 import org.apache.asn1new.ldap.pojo.LdapMessage;
-import org.apache.asn1.codec.util.StringUtils;
+import org.apache.ldap.common.util.StringTools;
 
 import junit.framework.Assert;
 import junit.framework.TestCase;
@@ -59,7 +59,7 @@
 									// }
             } );
 
-        String decodedPdu = StringUtils.dumpBytes( stream.array() );
+        String decodedPdu = StringTools.dumpBytes( stream.array() );
         stream.flip();
 
         // Allocate a LdapMessage Container
@@ -92,7 +92,7 @@
         {
             ByteBuffer bb = message.encode( null );
             
-            String encodedPdu = StringUtils.dumpBytes( bb.array() ); 
+            String encodedPdu = StringTools.dumpBytes( bb.array() ); 
             
             Assert.assertEquals(encodedPdu, decodedPdu );
         }