directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1051130 [2/7] - in /directory: apacheds/branches/alex_refactoring/core-api/src/main/java/org/apache/directory/server/core/ apacheds/branches/alex_refactoring/core-api/src/main/java/org/apache/directory/server/core/entry/ apacheds/branches/...
Date Mon, 20 Dec 2010 14:31:36 GMT
Modified: directory/apacheds/branches/alex_refactoring/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java (original)
+++ directory/apacheds/branches/alex_refactoring/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java Mon Dec 20 14:31:29 2010
@@ -58,9 +58,9 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.util.Base64;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.ldap.util.UnixCrypt;
 import org.apache.directory.shared.util.CharConstants;
+import org.apache.directory.shared.util.Strings;
 
 
 /**
@@ -322,7 +322,7 @@ public class SimpleAuthenticator extends
         String result = null;
 
         // Check if password arg is string or byte[]
-        String sPassword = StringTools.utf8ToString( password );
+        String sPassword = Strings.utf8ToString(password);
         int rightParen = sPassword.indexOf( '}' );
 
         if ( ( sPassword.length() > 2 ) && ( sPassword.charAt( 0 ) == '{' ) && ( rightParen > -1 ) )
@@ -376,9 +376,9 @@ public class SimpleAuthenticator extends
         {
             if ( LdapSecurityConstants.HASH_METHOD_CRYPT.getName().equalsIgnoreCase( algorithm ) )
             {
-                String saltWithCrypted = UnixCrypt.crypt( StringTools.utf8ToString( password ), "" );
+                String saltWithCrypted = UnixCrypt.crypt( Strings.utf8ToString(password), "" );
                 String crypted = saltWithCrypted.substring( 2 );
-                return '{' + algorithm + '}' + Arrays.toString( StringTools.getBytesUtf8( crypted ) );
+                return '{' + algorithm + '}' + Arrays.toString( Strings.getBytesUtf8(crypted) );
             }
             else
             {

Modified: directory/apacheds/branches/alex_refactoring/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java (original)
+++ directory/apacheds/branches/alex_refactoring/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java Mon Dec 20 14:31:29 2010
@@ -48,7 +48,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.apache.directory.shared.ldap.util.LdapURL;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -104,7 +104,7 @@ public class ReferralInterceptor extends
             throw new LdapException( message );
         }
 
-        if ( !StringTools.isEmpty( ldapUrl.getFilter() ) )
+        if ( !Strings.isEmpty(ldapUrl.getFilter()) )
         {
             String message = I18n.err( I18n.ERR_37 );
             LOG.error( message );

Modified: directory/apacheds/branches/alex_refactoring/core/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticatorOneWayEncryptedTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/core/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticatorOneWayEncryptedTest.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/core/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticatorOneWayEncryptedTest.java (original)
+++ directory/apacheds/branches/alex_refactoring/core/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticatorOneWayEncryptedTest.java Mon Dec 20 14:31:29 2010
@@ -25,7 +25,7 @@ import static org.junit.Assert.assertEqu
 
 import org.apache.directory.junit.tools.Concurrent;
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -55,15 +55,15 @@ public class SimpleAuthenticatorOneWayEn
     public void testGetAlgorithmForHashedPassword()
     {
         String digestetValue = "{SHA}LhkDrSoM6qr0fW6hzlfOJQW61tc=";
-        assertEquals( "SHA", auth.getAlgorithmForHashedPassword( StringTools.getBytesUtf8( digestetValue ) ) );
+        assertEquals( "SHA", auth.getAlgorithmForHashedPassword( Strings.getBytesUtf8(digestetValue) ) );
         assertEquals( "SHA", auth.getAlgorithmForHashedPassword( digestetValue.getBytes() ) );
 
         String noAlgorithm = "Secret1!";
-        assertEquals( null, auth.getAlgorithmForHashedPassword( StringTools.getBytesUtf8( noAlgorithm ) ) );
+        assertEquals( null, auth.getAlgorithmForHashedPassword( Strings.getBytesUtf8(noAlgorithm) ) );
         assertEquals( null, auth.getAlgorithmForHashedPassword( noAlgorithm.getBytes() ) );
 
         String unknownAlgorithm = "{XYZ}LhkDrSoM6qr0fW6hzlfOJQW61tc=";
-        assertEquals( null, auth.getAlgorithmForHashedPassword( StringTools.getBytesUtf8( unknownAlgorithm ) ) );
+        assertEquals( null, auth.getAlgorithmForHashedPassword( Strings.getBytesUtf8(unknownAlgorithm) ) );
         assertEquals( null, auth.getAlgorithmForHashedPassword( unknownAlgorithm.getBytes() ) );
     }
 
@@ -73,7 +73,7 @@ public class SimpleAuthenticatorOneWayEn
     {
         String pwd = "Secret1!";
         String expected = "{SHA}znbJr3+tymFoQD4+Njh4ITtI7Cc=";
-        String digested = auth.createDigestedPassword( "SHA", StringTools.getBytesUtf8( pwd ) );
+        String digested = auth.createDigestedPassword( "SHA", Strings.getBytesUtf8(pwd) );
 
         assertEquals( expected, digested );
     }

Modified: directory/apacheds/branches/alex_refactoring/core/src/test/java/org/apache/directory/server/core/changelog/MemoryChangeLogStoreTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/core/src/test/java/org/apache/directory/server/core/changelog/MemoryChangeLogStoreTest.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/core/src/test/java/org/apache/directory/server/core/changelog/MemoryChangeLogStoreTest.java (original)
+++ directory/apacheds/branches/alex_refactoring/core/src/test/java/org/apache/directory/server/core/changelog/MemoryChangeLogStoreTest.java Mon Dec 20 14:31:29 2010
@@ -45,7 +45,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.schema.normalizers.NoOpNormalizer;
 import org.apache.directory.shared.ldap.schema.normalizers.OidNormalizer;
 import org.apache.directory.shared.ldap.util.DateUtils;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -136,7 +136,7 @@ public class MemoryChangeLogStoreTest
         String zuluTime = DateUtils.getGeneralizedTime();
         long revision = 1L;
         
-        LdapPrincipal principal = new LdapPrincipal( adminDn, AuthenticationLevel.SIMPLE, StringTools.getBytesUtf8( "secret"  ) );
+        LdapPrincipal principal = new LdapPrincipal( adminDn, AuthenticationLevel.SIMPLE, Strings.getBytesUtf8("secret") );
         ChangeLogEvent event = new ChangeLogEvent( revision, zuluTime, principal, forward, reverse );
         
         ByteArrayOutputStream baos = new ByteArrayOutputStream();

Modified: directory/apacheds/branches/alex_refactoring/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ServerEntrySerializerTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ServerEntrySerializerTest.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ServerEntrySerializerTest.java (original)
+++ directory/apacheds/branches/alex_refactoring/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ServerEntrySerializerTest.java Mon Dec 20 14:31:29 2010
@@ -44,7 +44,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.schema.normalizers.DeepTrimToLowerNormalizer;
 import org.apache.directory.shared.ldap.schema.normalizers.OidNormalizer;
 import org.apache.directory.shared.ldap.util.LdapExceptionUtils;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -196,7 +196,7 @@ public class ServerEntrySerializerTest
         entry.add( "objectClass", "top", "person", "inetOrgPerson", "organizationalPerson" );
         entry.add( "cn", "text", "test" );
         entry.add( "SN", ( String ) null );
-        entry.add( "userPassword", StringTools.getBytesUtf8( "password" ) );
+        entry.add( "userPassword", Strings.getBytesUtf8("password") );
 
         ServerEntrySerializer ses = new ServerEntrySerializer( schemaManager );
 
@@ -222,7 +222,7 @@ public class ServerEntrySerializerTest
         entry.add( "objectClass", "top", "person", "inetOrgPerson", "organizationalPerson" );
         entry.add( "cn", "text", "test" );
         entry.add( "SN", ( String ) null );
-        entry.add( "userPassword", StringTools.getBytesUtf8( "password" ) );
+        entry.add( "userPassword", Strings.getBytesUtf8("password") );
 
         ServerEntrySerializer ses = new ServerEntrySerializer( schemaManager );
 
@@ -301,7 +301,7 @@ public class ServerEntrySerializerTest
         Entry entry = new DefaultEntry( schemaManager, dn );
 
         ServerEntrySerializer ses = new ServerEntrySerializer( schemaManager );
-        entry.add( "userPassword", StringTools.getBytesUtf8( "secret" ) );
+        entry.add( "userPassword", Strings.getBytesUtf8("secret") );
 
         byte[] data = ses.serialize( entry );
 

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/ChangePassword.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/ChangePassword.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/ChangePassword.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/ChangePassword.java Mon Dec 20 14:31:29 2010
@@ -37,7 +37,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 
 
 /**
@@ -80,7 +80,7 @@ public class ChangePassword implements D
         List<Modification> mods = new ArrayList<Modification>(2);
         
         EntryAttribute newPasswordAttribute = new DefaultEntryAttribute( 
-            schemaManager.lookupAttributeTypeRegistry( SchemaConstants.USER_PASSWORD_AT ), StringTools.getBytesUtf8( newPassword ) );
+            schemaManager.lookupAttributeTypeRegistry( SchemaConstants.USER_PASSWORD_AT ), Strings.getBytesUtf8(newPassword) );
         mods.add( new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, newPasswordAttribute ) );
         
         EntryAttribute principalAttribute = new DefaultEntryAttribute( 

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/KerberosTime.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/KerberosTime.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/KerberosTime.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/KerberosTime.java Mon Dec 20 14:31:29 2010
@@ -25,7 +25,7 @@ import java.util.Calendar;
 import java.util.Date;
 import java.util.TimeZone;
 
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 
 /**
  * An specialization of the ASN.1 GeneralTime. The Kerberos time contains date and 
@@ -199,7 +199,7 @@ public class KerberosTime implements Com
      */
     public byte[] getBytes()
     {
-        return StringTools.getBytesUtf8( date );
+        return Strings.getBytesUtf8(date);
     }
     
     

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/KerberosUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/KerberosUtils.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/KerberosUtils.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/KerberosUtils.java Mon Dec 20 14:31:29 2010
@@ -29,7 +29,7 @@ import javax.security.auth.kerberos.Kerb
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.shared.kerberos.codec.types.EncryptionType;
 import org.apache.directory.shared.kerberos.components.PrincipalName;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 
 /**
  * An utility class for Kerberos.
@@ -99,7 +99,7 @@ public class KerberosUtils
         
         String names = principal.getName();
         
-        if ( StringTools.isEmpty( names ) )
+        if ( Strings.isEmpty(names) )
         {
             // Empty name...
             return EMPTY_PRINCIPAL_NAME;
@@ -216,7 +216,7 @@ public class KerberosUtils
     {
         String name = principal.getNameString(); 
         
-        if ( !StringTools.isEmpty( realm ) )
+        if ( !Strings.isEmpty(realm) )
         {
             name += '@' + realm;
         }

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadKerberosTime.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadKerberosTime.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadKerberosTime.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadKerberosTime.java Mon Dec 20 14:31:29 2010
@@ -27,7 +27,7 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.kerberos.KerberosTime;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -83,7 +83,7 @@ public abstract class AbstractReadKerber
 
         // The value is the KerberosTime
         Value value = tlv.getValue();
-        String date = StringTools.utf8ToString( value.getData() );
+        String date = Strings.utf8ToString(value.getData());
 
         try
         {

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadRealm.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadRealm.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadRealm.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadRealm.java Mon Dec 20 14:31:29 2010
@@ -26,7 +26,7 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.i18n.I18n;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -80,7 +80,7 @@ public abstract class AbstractReadRealm 
         
         // The value is the realm
         Value value = tlv.getValue();
-        String realm = StringTools.utf8ToString( value.getData() );
+        String realm = Strings.utf8ToString(value.getData());
 
         if ( IS_DEBUG )
         {

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/etypeInfo2Entry/actions/StoreSalt.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/etypeInfo2Entry/actions/StoreSalt.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/etypeInfo2Entry/actions/StoreSalt.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/etypeInfo2Entry/actions/StoreSalt.java Mon Dec 20 14:31:29 2010
@@ -27,7 +27,7 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.DecoderException;
 import org.apache.directory.shared.kerberos.codec.etypeInfo2Entry.ETypeInfo2EntryContainer;
 import org.apache.directory.shared.kerberos.components.ETypeInfo2Entry;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -73,7 +73,7 @@ public class StoreSalt extends GrammarAc
             // The encrypted data may be null
             if ( value.getData() != null ) 
             {
-                String salt = StringTools.utf8ToString( value.getData() );
+                String salt = Strings.utf8ToString(value.getData());
                 etypeInfo2Entry.setSalt( salt );
             }
         }

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/hostAddress/actions/StoreAddress.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/hostAddress/actions/StoreAddress.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/hostAddress/actions/StoreAddress.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/hostAddress/actions/StoreAddress.java Mon Dec 20 14:31:29 2010
@@ -23,7 +23,7 @@ package org.apache.directory.shared.kerb
 import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.asn1.actions.AbstractReadOctetString;
 import org.apache.directory.shared.kerberos.codec.hostAddress.HostAddressContainer;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -62,7 +62,7 @@ public class StoreAddress extends Abstra
         
         if ( IS_DEBUG )
         {
-            LOG.debug( "Address : {}", StringTools.utf8ToString( data ) );
+            LOG.debug( "Address : {}", Strings.utf8ToString(data) );
         }
     }
 }

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcReqBody/actions/StoreFrom.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcReqBody/actions/StoreFrom.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcReqBody/actions/StoreFrom.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcReqBody/actions/StoreFrom.java Mon Dec 20 14:31:29 2010
@@ -29,7 +29,7 @@ import org.apache.directory.shared.i18n.
 import org.apache.directory.shared.kerberos.KerberosTime;
 import org.apache.directory.shared.kerberos.codec.kdcReqBody.KdcReqBodyContainer;
 import org.apache.directory.shared.kerberos.components.KdcReqBody;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -79,7 +79,7 @@ public class StoreFrom extends GrammarAc
         
         // The value is the KerberosTime
         Value value = tlv.getValue();
-        String date = StringTools.utf8ToString( value.getData() );
+        String date = Strings.utf8ToString(value.getData());
         
         try
         {

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcReqBody/actions/StoreTill.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcReqBody/actions/StoreTill.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcReqBody/actions/StoreTill.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcReqBody/actions/StoreTill.java Mon Dec 20 14:31:29 2010
@@ -29,7 +29,7 @@ import org.apache.directory.shared.i18n.
 import org.apache.directory.shared.kerberos.KerberosTime;
 import org.apache.directory.shared.kerberos.codec.kdcReqBody.KdcReqBodyContainer;
 import org.apache.directory.shared.kerberos.components.KdcReqBody;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -79,7 +79,7 @@ public class StoreTill extends GrammarAc
         
         // The value is the KerberosTime
         Value value = tlv.getValue();
-        String date = StringTools.utf8ToString( value.getData() );
+        String date = Strings.utf8ToString(value.getData());
         
         try
         {

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbError/actions/StoreEText.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbError/actions/StoreEText.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbError/actions/StoreEText.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbError/actions/StoreEText.java Mon Dec 20 14:31:29 2010
@@ -28,7 +28,7 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.kerberos.codec.krbError.KrbErrorContainer;
 import org.apache.directory.shared.kerberos.messages.KrbError;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -76,7 +76,7 @@ public class StoreEText extends GrammarA
         
         // The value is the realm
         Value value = tlv.getValue();
-        String eText = StringTools.utf8ToString( value.getData() );
+        String eText = Strings.utf8ToString(value.getData());
 
         KrbError krbError = krbErrContainer.getKrbError();
         krbError.setEText( eText );

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/principalName/actions/StoreNameString.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/principalName/actions/StoreNameString.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/principalName/actions/StoreNameString.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/principalName/actions/StoreNameString.java Mon Dec 20 14:31:29 2010
@@ -29,7 +29,6 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.kerberos.KerberosUtils;
 import org.apache.directory.shared.kerberos.codec.principalName.PrincipalNameContainer;
 import org.apache.directory.shared.kerberos.components.PrincipalName;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -84,7 +83,7 @@ public class StoreNameString extends Gra
         // The PrincipalName must be pure ASCII witout any control character
         if ( KerberosUtils.isKerberosString( value.getData() ) )
         {
-            String nameString = StringTools.utf8ToString( value.getData() );
+            String nameString = Strings.utf8ToString(value.getData());
     
             principalName.addName( nameString );
             principalNameContainer.setGrammarEndAllowed( true );
@@ -97,7 +96,7 @@ public class StoreNameString extends Gra
         else
         {
             String valBytes = Strings.dumpBytes(value.getData());
-            String valStr = StringTools.utf8ToString( value.getData() );
+            String valStr = Strings.utf8ToString(value.getData());
             String valAll = valBytes + "/" + valStr;
             LOG.error( I18n.err( I18n.ERR_745_NOT_A_KERBEROS_STRING, valAll ) );
     

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/AuthorizationDataEntry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/AuthorizationDataEntry.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/AuthorizationDataEntry.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/AuthorizationDataEntry.java Mon Dec 20 14:31:29 2010
@@ -22,7 +22,6 @@ package org.apache.directory.shared.kerb
 import java.util.Arrays;
 
 import org.apache.directory.shared.kerberos.codec.types.AuthorizationType;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.CharConstants;
 import org.apache.directory.shared.util.Strings;
 
@@ -88,7 +87,7 @@ public class AuthorizationDataEntry
      */
     public byte[] getAdData()
     {
-        if ( StringTools.isEmpty( adData ) )
+        if ( Strings.isEmpty(adData) )
         {
             return CharConstants.EMPTY_BYTES;
         }
@@ -117,7 +116,7 @@ public class AuthorizationDataEntry
      */
     public void setAdData( byte[] adData )
     {
-        if ( StringTools.isEmpty( adData ) )
+        if ( Strings.isEmpty(adData) )
         {
             this.adData = CharConstants.EMPTY_BYTES;
         }

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/ETypeInfo2Entry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/ETypeInfo2Entry.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/ETypeInfo2Entry.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/ETypeInfo2Entry.java Mon Dec 20 14:31:29 2010
@@ -31,7 +31,6 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.kerberos.KerberosConstants;
 import org.apache.directory.shared.kerberos.codec.types.EncryptionType;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -180,7 +179,7 @@ public class ETypeInfo2Entry extends Abs
         // Compute the salt
         if ( salt != null )
         {
-            saltBytes = StringTools.getBytesUtf8( salt );
+            saltBytes = Strings.getBytesUtf8(salt);
             saltTagLength = 1 + TLV.getNbBytes( saltBytes.length ) + saltBytes.length;
             etypeInfo2EntrySeqLength += 1 + TLV.getNbBytes( saltTagLength ) + saltTagLength;
         }

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncTicketPart.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncTicketPart.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncTicketPart.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/EncTicketPart.java Mon Dec 20 14:31:29 2010
@@ -34,7 +34,6 @@ import org.apache.directory.shared.kerbe
 import org.apache.directory.shared.kerberos.KerberosTime;
 import org.apache.directory.shared.kerberos.flags.TicketFlag;
 import org.apache.directory.shared.kerberos.flags.TicketFlags;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -181,7 +180,7 @@ public class EncTicketPart extends Abstr
         keyLen = key.computeLength();
         encTikcetPartSeqLen += 1 + TLV.getNbBytes( keyLen ) + keyLen;
 
-        cRealmBytes = StringTools.getBytesUtf8( cRealm );
+        cRealmBytes = Strings.getBytesUtf8(cRealm);
         cRealmLen = 1 + TLV.getNbBytes( cRealmBytes.length ) + cRealmBytes.length;
         encTikcetPartSeqLen += 1 + TLV.getNbBytes( cRealmLen ) + cRealmLen;
 

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/HostAddress.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/HostAddress.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/HostAddress.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/HostAddress.java Mon Dec 20 14:31:29 2010
@@ -33,7 +33,6 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.kerberos.codec.types.HostAddrType;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -351,7 +350,7 @@ public class HostAddress extends Abstrac
         }
         catch ( UnknownHostException uhe )
         {
-            return "Unknow host : " + StringTools.utf8ToString( address );
+            return "Unknow host : " + Strings.utf8ToString(address);
         }
     }
 }

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/KdcRep.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/KdcRep.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/KdcRep.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/KdcRep.java Mon Dec 20 14:31:29 2010
@@ -32,7 +32,7 @@ import org.apache.directory.shared.kerbe
 import org.apache.directory.shared.kerberos.KerberosMessageType;
 import org.apache.directory.shared.kerberos.messages.KerberosMessage;
 import org.apache.directory.shared.kerberos.messages.Ticket;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 
 /**
  * The KDC-REP data structure. It will store the object described by the ASN.1 grammar :
@@ -306,7 +306,7 @@ public class KdcRep extends KerberosMess
         }
         
         // The crealm length
-        crealmBytes = StringTools.getBytesUtf8( crealm );
+        crealmBytes = Strings.getBytesUtf8(crealm);
         crealmLength = 1 + TLV.getNbBytes( crealmBytes.length ) + crealmBytes.length;
         kdcRepSeqLength += 1 + TLV.getNbBytes( crealmLength ) + crealmLength; 
 

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/KdcReqBody.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/KdcReqBody.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/KdcReqBody.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/KdcReqBody.java Mon Dec 20 14:31:29 2010
@@ -37,8 +37,8 @@ import org.apache.directory.shared.kerbe
 import org.apache.directory.shared.kerberos.codec.options.KdcOptions;
 import org.apache.directory.shared.kerberos.codec.types.EncryptionType;
 import org.apache.directory.shared.kerberos.messages.Ticket;
-import org.apache.directory.shared.ldap.util.StringTools;
 
+import org.apache.directory.shared.util.Strings;
 import sun.security.krb5.internal.AuthorizationData;
 
 
@@ -476,7 +476,7 @@ public class KdcReqBody extends Abstract
         }
 
         // Compute the realm length.
-        realmBytes = StringTools.getBytesUtf8( realm );
+        realmBytes = Strings.getBytesUtf8(realm);
         realmLength = 1 + TLV.getNbBytes( realmBytes.length ) + realmBytes.length;
         kdcReqBodySeqLength += 1 + TLV.getNbBytes( realmLength ) + realmLength;
 

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/KrbCredInfo.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/KrbCredInfo.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/KrbCredInfo.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/KrbCredInfo.java Mon Dec 20 14:31:29 2010
@@ -33,7 +33,6 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.kerberos.KerberosConstants;
 import org.apache.directory.shared.kerberos.KerberosTime;
 import org.apache.directory.shared.kerberos.flags.TicketFlags;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -177,7 +176,7 @@ public class KrbCredInfo extends Abstrac
 
         if ( pRealm != null )
         {
-            pRealmBytes = StringTools.getBytesUtf8( pRealm );
+            pRealmBytes = Strings.getBytesUtf8(pRealm);
             pRealmLen = 1 + TLV.getNbBytes( pRealmBytes.length ) + pRealmBytes.length;
             krbKredInfoSeqLen += 1 + TLV.getNbBytes( pRealmLen ) + pRealmLen;
         }
@@ -225,7 +224,7 @@ public class KrbCredInfo extends Abstrac
 
         if ( sRealm != null )
         {
-            sRealmBytes = StringTools.getBytesUtf8( sRealm );
+            sRealmBytes = Strings.getBytesUtf8(sRealm);
             sRealmLen = 1 + TLV.getNbBytes( sRealmBytes.length ) + sRealmBytes.length;
             krbKredInfoSeqLen += 1 + TLV.getNbBytes( sRealmLen ) + sRealmLen;
         }

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/PrincipalName.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/PrincipalName.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/PrincipalName.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/PrincipalName.java Mon Dec 20 14:31:29 2010
@@ -102,7 +102,6 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.kerberos.KerberosUtils;
 import org.apache.directory.shared.kerberos.codec.types.PrincipalNameType;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.CharConstants;
 import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
@@ -340,7 +339,7 @@ public class PrincipalName extends Abstr
             {
                 if ( name != null )
                 {
-                    byte[] bytes = StringTools.getBytesUtf8( name );
+                    byte[] bytes = Strings.getBytesUtf8(name);
                     nameBytes.add( bytes );
                     principalStringsSeqLength += 1 + TLV.getNbBytes( bytes.length ) + bytes.length;
                 }

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/messages/Authenticator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/messages/Authenticator.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/messages/Authenticator.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/messages/Authenticator.java Mon Dec 20 14:31:29 2010
@@ -34,7 +34,6 @@ import org.apache.directory.shared.kerbe
 import org.apache.directory.shared.kerberos.components.Checksum;
 import org.apache.directory.shared.kerberos.components.EncryptionKey;
 import org.apache.directory.shared.kerberos.components.PrincipalName;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -332,7 +331,7 @@ public class Authenticator extends Kerbe
         authenticatorSeqLength =  1 + TLV.getNbBytes( authenticatorVnoLength ) + authenticatorVnoLength;
 
         // Compute the  crealm length.
-        crealmBytes = StringTools.getBytesUtf8( crealm );
+        crealmBytes = Strings.getBytesUtf8(crealm);
         crealmLength = 1 + TLV.getNbBytes( crealmBytes.length ) + crealmBytes.length;
         authenticatorSeqLength += 1 + TLV.getNbBytes( crealmLength ) + crealmLength;
 

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/messages/KrbError.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/messages/KrbError.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/messages/KrbError.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/messages/KrbError.java Mon Dec 20 14:31:29 2010
@@ -33,7 +33,6 @@ import org.apache.directory.shared.kerbe
 import org.apache.directory.shared.kerberos.KerberosTime;
 import org.apache.directory.shared.kerberos.components.PrincipalName;
 import org.apache.directory.shared.kerberos.exceptions.ErrorType;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -439,7 +438,7 @@ public class KrbError extends KerberosMe
         // The crealm, if any
         if ( cRealm != null )
         {
-            crealmBytes = StringTools.getBytesUtf8( cRealm );
+            crealmBytes = Strings.getBytesUtf8(cRealm);
             cRealmLength = 1 + TLV.getNbBytes( crealmBytes.length ) + crealmBytes.length;
             krbErrorSeqLength += 1 + TLV.getNbBytes( cRealmLength ) + cRealmLength;
         }
@@ -452,7 +451,7 @@ public class KrbError extends KerberosMe
         }
 
         // The realm
-        realmBytes = StringTools.getBytesUtf8( realm );
+        realmBytes = Strings.getBytesUtf8(realm);
         realmLength = 1 + TLV.getNbBytes( realmBytes.length ) + realmBytes.length;
         krbErrorSeqLength += 1 + TLV.getNbBytes( realmLength ) + realmLength;
 
@@ -463,7 +462,7 @@ public class KrbError extends KerberosMe
         // The e-text, if any
         if ( eText != null )
         {
-            eTextBytes = StringTools.getBytesUtf8( eText );
+            eTextBytes = Strings.getBytesUtf8(eText);
             eTextLength = 1 + TLV.getNbBytes( eTextBytes.length ) + eTextBytes.length;
             krbErrorSeqLength += 1 + TLV.getNbBytes( eTextLength ) + eTextLength;
         }

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/messages/Ticket.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/messages/Ticket.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/messages/Ticket.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/messages/Ticket.java Mon Dec 20 14:31:29 2010
@@ -34,7 +34,6 @@ import org.apache.directory.shared.kerbe
 import org.apache.directory.shared.kerberos.components.EncryptedData;
 import org.apache.directory.shared.kerberos.components.PrincipalName;
 import org.apache.directory.shared.kerberos.exceptions.InvalidTicketException;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -255,7 +254,7 @@ public class Ticket extends KerberosMess
         tktvnoLength = 1 + 1 + Value.getNbBytes( getProtocolVersionNumber() );
 
         // Compute the Ticket realm length.
-        realmBytes = StringTools.getBytesUtf8( realm );
+        realmBytes = Strings.getBytesUtf8(realm);
         realmLength = 1 + TLV.getNbBytes( realmBytes.length ) + realmBytes.length;
 
         // Compute the principal length

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AdIfRelevantDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AdIfRelevantDecoderTest.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AdIfRelevantDecoderTest.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AdIfRelevantDecoderTest.java Mon Dec 20 14:31:29 2010
@@ -35,7 +35,6 @@ import org.apache.directory.shared.kerbe
 import org.apache.directory.shared.kerberos.codec.types.AuthorizationType;
 import org.apache.directory.shared.kerberos.components.AdIfRelevant;
 import org.apache.directory.shared.kerberos.components.AuthorizationDataEntry;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 
@@ -95,7 +94,7 @@ public class AdIfRelevantDecoderTest
         for ( AuthorizationDataEntry ad : adIfRelevant.getAuthorizationData() )
         {
             assertEquals( AuthorizationType.AD_INTENDED_FOR_SERVER, ad.getAdType() );
-            assertTrue( Arrays.equals( StringTools.getBytesUtf8( expected[i++] ), ad.getAdData() ) );
+            assertTrue( Arrays.equals( Strings.getBytesUtf8(expected[i++]), ad.getAdData() ) );
             
         }
 

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AdKdcIssuedDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AdKdcIssuedDecoderTest.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AdKdcIssuedDecoderTest.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AdKdcIssuedDecoderTest.java Mon Dec 20 14:31:29 2010
@@ -44,7 +44,6 @@ import org.apache.directory.shared.kerbe
 import org.apache.directory.shared.kerberos.components.Checksum;
 import org.apache.directory.shared.kerberos.components.PrincipalName;
 import org.apache.directory.shared.kerberos.crypto.checksum.ChecksumType;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -123,7 +122,7 @@ public class AdKdcIssuedDecoderTest
         Checksum checksum = adKdcIssued.getAdChecksum();
         
         assertEquals( ChecksumType.getTypeByValue( 2 ), checksum.getChecksumType() );
-        assertTrue( Arrays.equals( StringTools.getBytesUtf8( "chksum" ), checksum.getChecksumValue() ) );
+        assertTrue( Arrays.equals( Strings.getBytesUtf8("chksum"), checksum.getChecksumValue() ) );
 
         assertEquals( "EXAMPLE.COM", adKdcIssued.getIRealm() );
         
@@ -144,7 +143,7 @@ public class AdKdcIssuedDecoderTest
         for ( AuthorizationDataEntry ad : authData.getAuthorizationData() )
         {
             assertEquals( AuthorizationType.AD_INTENDED_FOR_SERVER, ad.getAdType() );
-            assertTrue( Arrays.equals( StringTools.getBytesUtf8( expected[i++] ), ad.getAdData() ) );
+            assertTrue( Arrays.equals( Strings.getBytesUtf8(expected[i++]), ad.getAdData() ) );
             
         }
 
@@ -227,7 +226,7 @@ public class AdKdcIssuedDecoderTest
         Checksum checksum = adKdcIssued.getAdChecksum();
         
         assertEquals( ChecksumType.getTypeByValue( 2 ), checksum.getChecksumType() );
-        assertTrue( Arrays.equals( StringTools.getBytesUtf8( "chksum" ), checksum.getChecksumValue() ) );
+        assertTrue( Arrays.equals( Strings.getBytesUtf8("chksum"), checksum.getChecksumValue() ) );
 
         // The realm
         assertNull( adKdcIssued.getIRealm() );
@@ -247,7 +246,7 @@ public class AdKdcIssuedDecoderTest
         for ( AuthorizationDataEntry ad : authData.getAuthorizationData() )
         {
             assertEquals( AuthorizationType.AD_INTENDED_FOR_SERVER, ad.getAdType() );
-            assertTrue( Arrays.equals( StringTools.getBytesUtf8( expected[i++] ), ad.getAdData() ) );
+            assertTrue( Arrays.equals( Strings.getBytesUtf8(expected[i++]), ad.getAdData() ) );
             
         }
 

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AdMandatoryForKdcDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AdMandatoryForKdcDecoderTest.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AdMandatoryForKdcDecoderTest.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AdMandatoryForKdcDecoderTest.java Mon Dec 20 14:31:29 2010
@@ -35,7 +35,6 @@ import org.apache.directory.shared.kerbe
 import org.apache.directory.shared.kerberos.codec.types.AuthorizationType;
 import org.apache.directory.shared.kerberos.components.AdMandatoryForKdc;
 import org.apache.directory.shared.kerberos.components.AuthorizationDataEntry;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 
@@ -95,7 +94,7 @@ public class AdMandatoryForKdcDecoderTes
         for ( AuthorizationDataEntry ad : adMandatoryForKdc.getAuthorizationData() )
         {
             assertEquals( AuthorizationType.AD_INTENDED_FOR_SERVER, ad.getAdType() );
-            assertTrue( Arrays.equals( StringTools.getBytesUtf8( expected[i++] ), ad.getAdData() ) );
+            assertTrue( Arrays.equals( Strings.getBytesUtf8(expected[i++]), ad.getAdData() ) );
             
         }
 

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AuthorizationDataDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AuthorizationDataDecoderTest.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AuthorizationDataDecoderTest.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/AuthorizationDataDecoderTest.java Mon Dec 20 14:31:29 2010
@@ -35,7 +35,6 @@ import org.apache.directory.shared.kerbe
 import org.apache.directory.shared.kerberos.codec.types.AuthorizationType;
 import org.apache.directory.shared.kerberos.components.AuthorizationData;
 import org.apache.directory.shared.kerberos.components.AuthorizationDataEntry;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 
@@ -95,7 +94,7 @@ public class AuthorizationDataDecoderTes
         for ( AuthorizationDataEntry ad : authData.getAuthorizationData() )
         {
             assertEquals( AuthorizationType.AD_INTENDED_FOR_SERVER, ad.getAdType() );
-            assertTrue( Arrays.equals( StringTools.getBytesUtf8( expected[i++] ), ad.getAdData() ) );
+            assertTrue( Arrays.equals( Strings.getBytesUtf8(expected[i++]), ad.getAdData() ) );
             
         }
 

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ChecksumDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ChecksumDecoderTest.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ChecksumDecoderTest.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ChecksumDecoderTest.java Mon Dec 20 14:31:29 2010
@@ -33,7 +33,6 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.kerberos.codec.checksum.ChecksumContainer;
 import org.apache.directory.shared.kerberos.components.Checksum;
 import org.apache.directory.shared.kerberos.crypto.checksum.ChecksumType;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 
@@ -77,7 +76,7 @@ public class ChecksumDecoderTest
         Checksum checksum = chkContainer.getChecksum();
         
         assertEquals( ChecksumType.getTypeByValue( 2 ), checksum.getChecksumType() );
-        assertTrue( Arrays.equals( StringTools.getBytesUtf8( "chksum" ), checksum.getChecksumValue() ) );
+        assertTrue( Arrays.equals( Strings.getBytesUtf8("chksum"), checksum.getChecksumValue() ) );
         
         ByteBuffer bb = ByteBuffer.allocate( checksum.computeLength() );
         

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ETypeInfo2EntryDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ETypeInfo2EntryDecoderTest.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ETypeInfo2EntryDecoderTest.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ETypeInfo2EntryDecoderTest.java Mon Dec 20 14:31:29 2010
@@ -34,7 +34,6 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.kerberos.codec.etypeInfo2Entry.ETypeInfo2EntryContainer;
 import org.apache.directory.shared.kerberos.codec.types.EncryptionType;
 import org.apache.directory.shared.kerberos.components.ETypeInfo2Entry;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 
@@ -86,7 +85,7 @@ public class ETypeInfo2EntryDecoderTest
         
         assertEquals( EncryptionType.DES3_CBC_MD5, etypeInfo2Entry.getEType() );
         assertEquals( "abcd", etypeInfo2Entry.getSalt() );
-        assertTrue( Arrays.equals( StringTools.getBytesUtf8( "1234" ), etypeInfo2Entry.getS2kparams() ) );
+        assertTrue( Arrays.equals( Strings.getBytesUtf8("1234"), etypeInfo2Entry.getS2kparams() ) );
         
         ByteBuffer bb = ByteBuffer.allocate( etypeInfo2Entry.computeLength() );
         

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ETypeInfoDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ETypeInfoDecoderTest.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ETypeInfoDecoderTest.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ETypeInfoDecoderTest.java Mon Dec 20 14:31:29 2010
@@ -37,7 +37,6 @@ import org.apache.directory.shared.kerbe
 import org.apache.directory.shared.kerberos.codec.types.EncryptionType;
 import org.apache.directory.shared.kerberos.components.ETypeInfo;
 import org.apache.directory.shared.kerberos.components.ETypeInfoEntry;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -105,7 +104,7 @@ public class ETypeInfoDecoderTest
         for ( ETypeInfoEntry etypeInfoEntry : etypeInfo.getETypeInfoEntries() )
         {
             assertEquals( EncryptionType.DES3_CBC_MD5, etypeInfoEntry.getEType() );
-            assertTrue( Arrays.equals( StringTools.getBytesUtf8( expected[i] ), etypeInfoEntry.getSalt() ) );
+            assertTrue( Arrays.equals( Strings.getBytesUtf8(expected[i]), etypeInfoEntry.getSalt() ) );
             i++;
         }
 

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ETypeInfoEntryDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ETypeInfoEntryDecoderTest.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ETypeInfoEntryDecoderTest.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/ETypeInfoEntryDecoderTest.java Mon Dec 20 14:31:29 2010
@@ -34,7 +34,6 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.kerberos.codec.etypeInfoEntry.ETypeInfoEntryContainer;
 import org.apache.directory.shared.kerberos.codec.types.EncryptionType;
 import org.apache.directory.shared.kerberos.components.ETypeInfoEntry;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 
@@ -83,7 +82,7 @@ public class ETypeInfoEntryDecoderTest
         ETypeInfoEntry etypeInforEntry = container.getETypeInfoEntry();
         
         assertEquals( EncryptionType.DES3_CBC_MD5, etypeInforEntry.getEType() );
-        assertTrue( Arrays.equals( StringTools.getBytesUtf8( "1234" ), etypeInforEntry.getSalt() ) );
+        assertTrue( Arrays.equals( Strings.getBytesUtf8("1234"), etypeInforEntry.getSalt() ) );
         
         ByteBuffer bb = ByteBuffer.allocate( etypeInforEntry.computeLength() );
         

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncryptedDataDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncryptedDataDecoderTest.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncryptedDataDecoderTest.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncryptedDataDecoderTest.java Mon Dec 20 14:31:29 2010
@@ -37,7 +37,6 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.kerberos.codec.encryptedData.EncryptedDataContainer;
 import org.apache.directory.shared.kerberos.codec.types.EncryptionType;
 import org.apache.directory.shared.kerberos.components.EncryptedData;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -94,7 +93,7 @@ public class EncryptedDataDecoderTest
 
         assertEquals( EncryptionType.AES256_CTS_HMAC_SHA1_96, encryptedData.getEType() );
         assertEquals( 5, encryptedData.getKvno() );
-        assertTrue( Arrays.equals( StringTools.getBytesUtf8( "abcdef" ), encryptedData.getCipher() ) );
+        assertTrue( Arrays.equals( Strings.getBytesUtf8("abcdef"), encryptedData.getCipher() ) );
 
         // Check the encoding
         ByteBuffer bb = ByteBuffer.allocate( encryptedData.computeLength() );
@@ -157,7 +156,7 @@ public class EncryptedDataDecoderTest
 
         assertEquals( EncryptionType.AES256_CTS_HMAC_SHA1_96, encryptedData.getEType() );
         assertFalse( encryptedData.hasKvno() );
-        assertTrue( Arrays.equals( StringTools.getBytesUtf8( "abcdef" ), encryptedData.getCipher() ) );
+        assertTrue( Arrays.equals( Strings.getBytesUtf8("abcdef"), encryptedData.getCipher() ) );
 
         // Check the encoding
         ByteBuffer bb = ByteBuffer.allocate( encryptedData.computeLength() );

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncryptionKeyDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncryptionKeyDecoderTest.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncryptionKeyDecoderTest.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncryptionKeyDecoderTest.java Mon Dec 20 14:31:29 2010
@@ -33,7 +33,6 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.kerberos.codec.encryptionKey.EncryptionKeyContainer;
 import org.apache.directory.shared.kerberos.codec.types.EncryptionType;
 import org.apache.directory.shared.kerberos.components.EncryptionKey;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 
@@ -79,7 +78,7 @@ public class EncryptionKeyDecoderTest
         EncryptionKey encKey = container.getEncryptionKey();
         
         assertEquals( EncryptionType.getTypeByValue( 2 ), encKey.getKeyType() );
-        assertTrue( Arrays.equals( StringTools.getBytesUtf8( "keyval" ), encKey.getKeyValue() ) );
+        assertTrue( Arrays.equals( Strings.getBytesUtf8("keyval"), encKey.getKeyValue() ) );
         
         ByteBuffer bb = ByteBuffer.allocate( encKey.computeLength() );
         

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/HostAddressDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/HostAddressDecoderTest.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/HostAddressDecoderTest.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/HostAddressDecoderTest.java Mon Dec 20 14:31:29 2010
@@ -36,7 +36,6 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.kerberos.codec.hostAddress.HostAddressContainer;
 import org.apache.directory.shared.kerberos.codec.types.HostAddrType;
 import org.apache.directory.shared.kerberos.components.HostAddress;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -90,7 +89,7 @@ public class HostAddressDecoderTest
         HostAddress hostAddress = ( ( HostAddressContainer ) hostAddressContainer ).getHostAddress();
 
         assertEquals( HostAddrType.ADDRTYPE_INET, hostAddress.getAddrType() );
-        assertTrue( Arrays.equals( StringTools.getBytesUtf8( "192.168.0.1" ), hostAddress.getAddress() ) );
+        assertTrue( Arrays.equals( Strings.getBytesUtf8("192.168.0.1"), hostAddress.getAddress() ) );
 
         // Check the encoding
         ByteBuffer bb = ByteBuffer.allocate( hostAddress.computeLength() );

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/HostAddressesDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/HostAddressesDecoderTest.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/HostAddressesDecoderTest.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/HostAddressesDecoderTest.java Mon Dec 20 14:31:29 2010
@@ -38,7 +38,6 @@ import org.apache.directory.shared.kerbe
 import org.apache.directory.shared.kerberos.codec.types.HostAddrType;
 import org.apache.directory.shared.kerberos.components.HostAddress;
 import org.apache.directory.shared.kerberos.components.HostAddresses;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -111,7 +110,7 @@ public class HostAddressesDecoderTest
         for ( HostAddress hostAddress : hostAddresses.getAddresses() )
         {
             assertEquals( HostAddrType.ADDRTYPE_INET, hostAddress.getAddrType() );
-            assertTrue( Arrays.equals( StringTools.getBytesUtf8( expected[i] ), hostAddress.getAddress() ) );
+            assertTrue( Arrays.equals( Strings.getBytesUtf8(expected[i]), hostAddress.getAddress() ) );
             i++;
         }
 

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/MethodDataDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/MethodDataDecoderTest.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/MethodDataDecoderTest.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/MethodDataDecoderTest.java Mon Dec 20 14:31:29 2010
@@ -37,7 +37,6 @@ import org.apache.directory.shared.kerbe
 import org.apache.directory.shared.kerberos.codec.types.PaDataType;
 import org.apache.directory.shared.kerberos.components.MethodData;
 import org.apache.directory.shared.kerberos.components.PaData;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -105,7 +104,7 @@ public class MethodDataDecoderTest
         for ( PaData paData : methodData.getPaDatas() )
         {
             assertEquals( PaDataType.PA_ENC_TIMESTAMP, paData.getPaDataType() );
-            assertTrue( Arrays.equals( StringTools.getBytesUtf8( expected[i] ), paData.getPaDataValue() ) );
+            assertTrue( Arrays.equals( Strings.getBytesUtf8(expected[i]), paData.getPaDataValue() ) );
             i++;
         }
 

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/PaDataDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/PaDataDecoderTest.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/PaDataDecoderTest.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/PaDataDecoderTest.java Mon Dec 20 14:31:29 2010
@@ -33,7 +33,6 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.kerberos.codec.padata.PaDataContainer;
 import org.apache.directory.shared.kerberos.codec.types.PaDataType;
 import org.apache.directory.shared.kerberos.components.PaData;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 
@@ -79,7 +78,7 @@ public class PaDataDecoderTest
         PaData checksum = container.getPaData();
         
         assertEquals( PaDataType.getTypeByValue( 2 ), checksum.getPaDataType() );
-        assertTrue( Arrays.equals( StringTools.getBytesUtf8( "padata" ), checksum.getPaDataValue() ) );
+        assertTrue( Arrays.equals( Strings.getBytesUtf8("padata"), checksum.getPaDataValue() ) );
         
         ByteBuffer bb = ByteBuffer.allocate( checksum.computeLength() );
         

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/PaEncTimestampDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/PaEncTimestampDecoderTest.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/PaEncTimestampDecoderTest.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/PaEncTimestampDecoderTest.java Mon Dec 20 14:31:29 2010
@@ -36,7 +36,6 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.kerberos.codec.paEncTimestamp.PaEncTimestampContainer;
 import org.apache.directory.shared.kerberos.codec.types.EncryptionType;
 import org.apache.directory.shared.kerberos.components.PaEncTimestamp;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -93,7 +92,7 @@ public class PaEncTimestampDecoderTest
 
         assertEquals( EncryptionType.AES256_CTS_HMAC_SHA1_96, paEncTimestamp.getEType() );
         assertEquals( 5, paEncTimestamp.getKvno() );
-        assertTrue( Arrays.equals( StringTools.getBytesUtf8( "abcdef" ), paEncTimestamp.getCipher() ) );
+        assertTrue( Arrays.equals( Strings.getBytesUtf8("abcdef"), paEncTimestamp.getCipher() ) );
 
         // Check the encoding
         ByteBuffer bb = ByteBuffer.allocate( paEncTimestamp.computeLength() );

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TicketDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TicketDecoderTest.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TicketDecoderTest.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TicketDecoderTest.java Mon Dec 20 14:31:29 2010
@@ -40,7 +40,6 @@ import org.apache.directory.shared.kerbe
 import org.apache.directory.shared.kerberos.components.EncryptedData;
 import org.apache.directory.shared.kerberos.components.PrincipalName;
 import org.apache.directory.shared.kerberos.messages.Ticket;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -121,7 +120,7 @@ public class TicketDecoderTest
         assertNotNull( encryptedData );
         assertEquals( EncryptionType.AES256_CTS_HMAC_SHA1_96, encryptedData.getEType() );
         assertEquals( 5, encryptedData.getKvno() );
-        assertTrue( Arrays.equals( StringTools.getBytesUtf8( "abcdef" ), encryptedData.getCipher() ) );
+        assertTrue( Arrays.equals( Strings.getBytesUtf8("abcdef"), encryptedData.getCipher() ) );
 
         // Check the encoding
         try

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TransitedEncodingDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TransitedEncodingDecoderTest.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TransitedEncodingDecoderTest.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TransitedEncodingDecoderTest.java Mon Dec 20 14:31:29 2010
@@ -36,7 +36,6 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.kerberos.codec.transitedEncoding.TransitedEncodingContainer;
 import org.apache.directory.shared.kerberos.codec.types.TransitedEncodingType;
 import org.apache.directory.shared.kerberos.components.TransitedEncoding;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -90,7 +89,7 @@ public class TransitedEncodingDecoderTes
         TransitedEncoding transitedEncoding = ( ( TransitedEncodingContainer ) transitedEncodingContainer ).getTransitedEncoding();
 
         assertEquals( TransitedEncodingType.DOMAIN_X500_COMPRESS, transitedEncoding.getTrType() );
-        assertTrue( Arrays.equals( StringTools.getBytesUtf8( "abcdef" ), transitedEncoding.getContents() ) );
+        assertTrue( Arrays.equals( Strings.getBytesUtf8("abcdef"), transitedEncoding.getContents() ) );
 
         // Check the encoding
         ByteBuffer bb = ByteBuffer.allocate( transitedEncoding.computeLength() );

Modified: directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TypedDataDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TypedDataDecoderTest.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TypedDataDecoderTest.java (original)
+++ directory/apacheds/branches/alex_refactoring/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/TypedDataDecoderTest.java Mon Dec 20 14:31:29 2010
@@ -33,7 +33,6 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.EncoderException;
 import org.apache.directory.shared.kerberos.codec.typedData.TypedDataContainer;
 import org.apache.directory.shared.kerberos.components.TypedData;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 
@@ -93,7 +92,7 @@ public class TypedDataDecoderTest
         for ( TypedData.TD td : typedData.getTypedData() )
         {
             assertEquals( 2, td.getDataType() );
-            assertTrue( Arrays.equals( StringTools.getBytesUtf8( expected[i++] ), td.getDataValue() ) );
+            assertTrue( Arrays.equals( Strings.getBytesUtf8(expected[i++]), td.getDataValue() ) );
         }
 
         // Check the encoding

Modified: directory/apacheds/branches/alex_refactoring/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartition.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartition.java (original)
+++ directory/apacheds/branches/alex_refactoring/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartition.java Mon Dec 20 14:31:29 2010
@@ -50,7 +50,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.ldif.LdifEntry;
 import org.apache.directory.shared.ldap.ldif.LdifReader;
 import org.apache.directory.shared.ldap.ldif.LdifUtils;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -387,7 +387,7 @@ public class SingleFileLdifPartition ext
         synchronized ( lock )
         {
             String ldif = LdifUtils.convertEntryToLdif( entry );
-            ldifFile.write( StringTools.getBytesUtf8( ldif + "\n" ) );
+            ldifFile.write( Strings.getBytesUtf8(ldif + "\n") );
         }
     }
 

Modified: directory/apacheds/branches/alex_refactoring/ldif-partition/src/test/java/org/apache/directory/server/core/partition/SingleFileLdifPartitionTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/ldif-partition/src/test/java/org/apache/directory/server/core/partition/SingleFileLdifPartitionTest.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/ldif-partition/src/test/java/org/apache/directory/server/core/partition/SingleFileLdifPartitionTest.java (original)
+++ directory/apacheds/branches/alex_refactoring/ldif-partition/src/test/java/org/apache/directory/server/core/partition/SingleFileLdifPartitionTest.java Mon Dec 20 14:31:29 2010
@@ -79,7 +79,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager;
 import org.apache.directory.shared.ldap.schema.normalizers.ConcreteNameComponentNormalizer;
 import org.apache.directory.shared.ldap.util.LdapExceptionUtils;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Rule;
@@ -180,7 +180,7 @@ public class SingleFileLdifPartitionTest
     {
         // while writing to the file 1 extra newline char will be added
         String ldif = LdifUtils.convertEntryToLdif( entry ) + 1;
-        byte[] data = StringTools.getBytesUtf8( ldif );
+        byte[] data = Strings.getBytesUtf8(ldif);
 
         return data.length;
     }
@@ -433,7 +433,7 @@ public class SingleFileLdifPartitionTest
 
         file.read( entry1Data );
 
-        String ldif = StringTools.utf8ToString( entry1Data );
+        String ldif = Strings.utf8ToString(entry1Data);
 
         LdifEntry ldifEntry = reader.parseLdif( ldif ).get( 0 );
 
@@ -466,7 +466,7 @@ public class SingleFileLdifPartitionTest
 
         file.read( entry1Data );
 
-        ldif = StringTools.utf8ToString( entry1Data );
+        ldif = Strings.utf8ToString(entry1Data);
 
         ldifEntry = reader.parseLdif( ldif ).get( 0 );
 

Modified: directory/apacheds/branches/alex_refactoring/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolHandler.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolHandler.java (original)
+++ directory/apacheds/branches/alex_refactoring/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolHandler.java Mon Dec 20 14:31:29 2010
@@ -33,7 +33,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.spi.BinaryAttributeDetector;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.apache.mina.core.service.IoHandler;
 import org.apache.mina.core.session.IoSession;
 import org.apache.mina.filter.ssl.SslFilter;
@@ -101,7 +101,7 @@ class LdapProtocolHandler extends Demuxi
                     }
                     catch ( Exception e )
                     {
-                        if ( StringTools.isEmpty( id ) )
+                        if ( Strings.isEmpty(id) )
                         {
                             return false;
                         }

Modified: directory/apacheds/branches/alex_refactoring/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java (original)
+++ directory/apacheds/branches/alex_refactoring/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java Mon Dec 20 14:31:29 2010
@@ -83,7 +83,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.SearchRequest;
 import org.apache.directory.shared.ldap.message.UnbindRequest;
 import org.apache.directory.shared.ldap.message.extended.NoticeOfDisconnect;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.apache.mina.core.filterchain.DefaultIoFilterChainBuilder;
 import org.apache.mina.core.filterchain.IoFilterChainBuilder;
 import org.apache.mina.core.future.WriteFuture;
@@ -323,7 +323,7 @@ public class LdapServer extends Director
     @SuppressWarnings("PMD.EmptyCatchBlock")
     private void loadKeyStore() throws Exception
     {
-        if ( StringTools.isEmpty( keystoreFile ) )
+        if ( Strings.isEmpty(keystoreFile) )
         {
             Provider provider = Security.getProvider( "SUN" );
             LOG.debug( "provider = {}", provider );

Modified: directory/apacheds/branches/alex_refactoring/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/BindHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/alex_refactoring/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/BindHandler.java?rev=1051130&r1=1051129&r2=1051130&view=diff
==============================================================================
--- directory/apacheds/branches/alex_refactoring/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/BindHandler.java (original)
+++ directory/apacheds/branches/alex_refactoring/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/BindHandler.java Mon Dec 20 14:31:29 2010
@@ -47,8 +47,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.LdapResult;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.DN;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.util.CharConstants;
+import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -450,7 +450,7 @@ public class BindHandler extends LdapReq
         String saslMechanism = bindRequest.getSaslMechanism();
 
         // The empty mechanism is also a request for a new Bind session
-        if ( StringTools.isEmpty( saslMechanism )
+        if ( Strings.isEmpty(saslMechanism)
             || !ldapSession.getSaslProperty( SaslConstants.SASL_MECH ).equals( saslMechanism ) )
         {
             sendAuthMethNotSupported( ldapSession, bindRequest );



Mime
View raw message