directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1062251 [2/13] - in /directory: apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/ apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/entry/ apacheds/trunk/core-api/src/main/java/org/apache/director...
Date Sat, 22 Jan 2011 20:08:59 GMT
Modified: directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/entry/SchemaAwareEntryTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/entry/SchemaAwareEntryTest.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/entry/SchemaAwareEntryTest.java (original)
+++ directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/entry/SchemaAwareEntryTest.java Sat Jan 22 20:08:48 2011
@@ -61,7 +61,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.schemaloader.LdifSchemaLoader;
 import org.apache.directory.shared.ldap.schemamanager.impl.DefaultSchemaManager;
 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;
@@ -698,7 +698,7 @@ public class SchemaAwareEntryTest
         entry.clear();
 
         // Test the addition of a binary value
-        byte[] test4 = StringTools.getBytesUtf8( "test4" );
+        byte[] test4 = Strings.getBytesUtf8("test4");
 
         entry.add( atCN, test4 );
         assertFalse( entry.get( atCN ).contains( test4 ) );
@@ -717,9 +717,9 @@ public class SchemaAwareEntryTest
         AttributeType atPassword = schemaManager.lookupAttributeTypeRegistry( "userPassword" );
         AttributeType atJpegPhoto = schemaManager.lookupAttributeTypeRegistry( "jpegPhoto" );
 
-        byte[] test1 = StringTools.getBytesUtf8( "test1" );
-        byte[] test2 = StringTools.getBytesUtf8( "test2" );
-        byte[] test3 = StringTools.getBytesUtf8( "test3" );
+        byte[] test1 = Strings.getBytesUtf8("test1");
+        byte[] test2 = Strings.getBytesUtf8("test2");
+        byte[] test3 = Strings.getBytesUtf8("test3");
 
         // Test that we can't inject a null AT
         try
@@ -777,7 +777,7 @@ public class SchemaAwareEntryTest
         entry.clear();
 
         // Test the addition of a String value. It should be converted to a byte array
-        byte[] test4 = StringTools.getBytesUtf8( "test4" );
+        byte[] test4 = Strings.getBytesUtf8("test4");
 
         entry.add( atPassword, "test4" );
         assertNotNull( entry.get( atPassword ) );
@@ -797,9 +797,9 @@ public class SchemaAwareEntryTest
 
         AttributeType atPassword = schemaManager.lookupAttributeTypeRegistry( "userPassword" );
 
-        byte[] b1 = StringTools.getBytesUtf8( "test1" );
-        byte[] b2 = StringTools.getBytesUtf8( "test2" );
-        byte[] b3 = StringTools.getBytesUtf8( "test3" );
+        byte[] b1 = Strings.getBytesUtf8("test1");
+        byte[] b2 = Strings.getBytesUtf8("test2");
+        byte[] b3 = Strings.getBytesUtf8("test3");
 
         Value<String> test1 = new StringValue( atDC, "test1" );
         Value<String> test2 = new StringValue( atDC, "test2" );
@@ -854,7 +854,7 @@ public class SchemaAwareEntryTest
         entry.clear();
 
         // Test the addition of a String value. It should be converted to a byte array
-        byte[] test4 = StringTools.getBytesUtf8( "test4" );
+        byte[] test4 = Strings.getBytesUtf8("test4");
 
         entry.add( atDC, test4 );
         assertFalse( entry.contains( atDC, test4 ) );
@@ -894,7 +894,7 @@ public class SchemaAwareEntryTest
         entry.clear();
 
         // Test the addition of a String value. It should be converted to a byte array
-        byte[] b4 = StringTools.getBytesUtf8( "test4" );
+        byte[] b4 = Strings.getBytesUtf8("test4");
 
         entry.add( atPassword, "test4" );
         assertNotNull( entry.get( atPassword ) );
@@ -949,7 +949,7 @@ public class SchemaAwareEntryTest
         entry.clear();
 
         // Test the addition of a binary value
-        byte[] test4 = StringTools.getBytesUtf8( "test4" );
+        byte[] test4 = Strings.getBytesUtf8("test4");
 
         entry.add( "DC", test4 );
         assertFalse( entry.contains( "DC", test4 ) );
@@ -967,9 +967,9 @@ public class SchemaAwareEntryTest
 
         AttributeType atPassword = schemaManager.lookupAttributeTypeRegistry( "userPassword" );
 
-        byte[] test1 = StringTools.getBytesUtf8( "test1" );
-        byte[] test2 = StringTools.getBytesUtf8( "test2" );
-        byte[] test3 = StringTools.getBytesUtf8( "test3" );
+        byte[] test1 = Strings.getBytesUtf8("test1");
+        byte[] test2 = Strings.getBytesUtf8("test2");
+        byte[] test3 = Strings.getBytesUtf8("test3");
 
         // Test a simple addition
         entry.add( "userPassword", test1 );
@@ -1005,7 +1005,7 @@ public class SchemaAwareEntryTest
         entry.clear();
 
         // Test the addition of a String value. It should be converted to a byte array
-        byte[] test4 = StringTools.getBytesUtf8( "test4" );
+        byte[] test4 = Strings.getBytesUtf8("test4");
 
         entry.add( "userPassword", "test4" );
         assertNotNull( entry.get( atPassword ) );
@@ -1025,9 +1025,9 @@ public class SchemaAwareEntryTest
 
         AttributeType atPassword = schemaManager.lookupAttributeTypeRegistry( "userPassword" );
 
-        byte[] b1 = StringTools.getBytesUtf8( "test1" );
-        byte[] b2 = StringTools.getBytesUtf8( "test2" );
-        byte[] b3 = StringTools.getBytesUtf8( "test3" );
+        byte[] b1 = Strings.getBytesUtf8("test1");
+        byte[] b2 = Strings.getBytesUtf8("test2");
+        byte[] b3 = Strings.getBytesUtf8("test3");
 
         Value<String> test1 = new StringValue( atDC, "test1" );
         Value<String> test2 = new StringValue( atDC, "test2" );
@@ -1075,7 +1075,7 @@ public class SchemaAwareEntryTest
         entry.clear();
 
         // Test the addition of a String value. It should be converted to a byte array
-        byte[] test4 = StringTools.getBytesUtf8( "test4" );
+        byte[] test4 = Strings.getBytesUtf8("test4");
 
         entry.add( "dC", test4 );
         assertFalse( entry.contains( "cN", test4 ) );
@@ -1117,7 +1117,7 @@ public class SchemaAwareEntryTest
         entry.clear();
 
         // Test the addition of a String value. It should be converted to a byte array
-        byte[] b4 = StringTools.getBytesUtf8( "test4" );
+        byte[] b4 = Strings.getBytesUtf8("test4");
 
         entry.add( "userPASSWORD", "test4" );
         assertNotNull( entry.get( atPassword ) );
@@ -1169,7 +1169,7 @@ public class SchemaAwareEntryTest
         entry.clear();
 
         // Test the addition of a binary value
-        byte[] test4 = StringTools.getBytesUtf8( "test4" );
+        byte[] test4 = Strings.getBytesUtf8("test4");
 
         entry.add( "dc", atDC, test4 );
         assertFalse( entry.contains( "dc", test4 ) );
@@ -1187,9 +1187,9 @@ public class SchemaAwareEntryTest
 
         AttributeType atPassword = schemaManager.lookupAttributeTypeRegistry( "userPassword" );
 
-        byte[] test1 = StringTools.getBytesUtf8( "test1" );
-        byte[] test2 = StringTools.getBytesUtf8( "test2" );
-        byte[] test3 = StringTools.getBytesUtf8( "test3" );
+        byte[] test1 = Strings.getBytesUtf8("test1");
+        byte[] test2 = Strings.getBytesUtf8("test2");
+        byte[] test3 = Strings.getBytesUtf8("test3");
 
         // Test a simple addition
         entry.add( "userPassword", atPassword, test1 );
@@ -1225,7 +1225,7 @@ public class SchemaAwareEntryTest
         entry.clear();
 
         // Test the addition of a String value. It should be converted to a byte array
-        byte[] test4 = StringTools.getBytesUtf8( "test4" );
+        byte[] test4 = Strings.getBytesUtf8("test4");
 
         entry.add( "userPassword", atPassword, "test4" );
         assertNotNull( entry.get( atPassword ) );
@@ -1245,9 +1245,9 @@ public class SchemaAwareEntryTest
 
         AttributeType atPassword = schemaManager.lookupAttributeTypeRegistry( "userPassword" );
 
-        byte[] b1 = StringTools.getBytesUtf8( "test1" );
-        byte[] b2 = StringTools.getBytesUtf8( "test2" );
-        byte[] b3 = StringTools.getBytesUtf8( "test3" );
+        byte[] b1 = Strings.getBytesUtf8("test1");
+        byte[] b2 = Strings.getBytesUtf8("test2");
+        byte[] b3 = Strings.getBytesUtf8("test3");
 
         Value<String> test1 = new StringValue( atDC, "test1" );
         Value<String> test2 = new StringValue( atDC, "test2" );
@@ -1295,7 +1295,7 @@ public class SchemaAwareEntryTest
         entry.clear();
 
         // Test the addition of a String value. It should be converted to a byte array
-        byte[] test4 = StringTools.getBytesUtf8( "test4" );
+        byte[] test4 = Strings.getBytesUtf8("test4");
 
         entry.add( "dC", atDC, test4 );
         assertFalse( entry.contains( "cN", test4 ) );
@@ -1337,7 +1337,7 @@ public class SchemaAwareEntryTest
         entry.clear();
 
         // Test the addition of a String value. It should be converted to a byte array
-        byte[] b4 = StringTools.getBytesUtf8( "test4" );
+        byte[] b4 = Strings.getBytesUtf8("test4");
 
         entry.add( "userPASSWORD", atPassword, "test4" );
         assertNotNull( entry.get( atPassword ) );
@@ -2761,10 +2761,10 @@ public class SchemaAwareEntryTest
             assertTrue( true );
         }
 
-        byte[] password = StringTools.getBytesUtf8( "test" );
-        byte[] test1 = StringTools.getBytesUtf8( "test1" );
-        byte[] test2 = StringTools.getBytesUtf8( "test2" );
-        byte[] test3 = StringTools.getBytesUtf8( "test3" );
+        byte[] password = Strings.getBytesUtf8("test");
+        byte[] test1 = Strings.getBytesUtf8("test1");
+        byte[] test2 = Strings.getBytesUtf8("test2");
+        byte[] test3 = Strings.getBytesUtf8("test3");
 
         // Add a single value
         atPwd = schemaManager.lookupAttributeTypeRegistry( "userPassword" );
@@ -2950,10 +2950,10 @@ public class SchemaAwareEntryTest
         }
 
         // Add a single value
-        byte[] test = StringTools.getBytesUtf8( "test" );
-        byte[] test1 = StringTools.getBytesUtf8( "test1" );
-        byte[] test2 = StringTools.getBytesUtf8( "test2" );
-        byte[] test3 = StringTools.getBytesUtf8( "test3" );
+        byte[] test = Strings.getBytesUtf8("test");
+        byte[] test1 = Strings.getBytesUtf8("test1");
+        byte[] test2 = Strings.getBytesUtf8("test2");
+        byte[] test3 = Strings.getBytesUtf8("test3");
 
         entry.put( "userPassword", test );
 
@@ -3107,9 +3107,9 @@ public class SchemaAwareEntryTest
         assertEquals( "userpassword", entry.get( atPassword ).getId() );
 
         // Test that we can add some new attributes with values
-        byte[] test1 = StringTools.getBytesUtf8( "test1" );
-        byte[] test2 = StringTools.getBytesUtf8( "test2" );
-        byte[] test3 = StringTools.getBytesUtf8( "test3" );
+        byte[] test1 = Strings.getBytesUtf8("test1");
+        byte[] test2 = Strings.getBytesUtf8("test2");
+        byte[] test3 = Strings.getBytesUtf8("test3");
 
         EntryAttribute result = entry.put( "UserPassword", atPassword, test1, test2, test3 );
         assertNotNull( result );
@@ -3542,8 +3542,8 @@ public class SchemaAwareEntryTest
 
         AttributeType atPassword = schemaManager.lookupAttributeTypeRegistry( "userPassword" );
 
-        byte[] b1 = StringTools.getBytesUtf8( "test1" );
-        byte[] b2 = StringTools.getBytesUtf8( "test2" );
+        byte[] b1 = Strings.getBytesUtf8("test1");
+        byte[] b2 = Strings.getBytesUtf8("test2");
 
         Value<String> test1 = new StringValue( atCN, "test1" );
         Value<String> test2 = new StringValue( atCN, "test2" );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java Sat Jan 22 20:08:48 2011
@@ -40,7 +40,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.ModifyRequestImpl;
 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.Strings;
 import org.junit.After;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -92,8 +92,8 @@ public class SimpleAuthenticationIT exte
 
         Entry entry = connection.lookup( userDn );;
         performAdminAccountChecks( entry );
-        assertTrue( ArrayUtils.isEquals( entry.get( "userPassword" ).get().getBytes(), StringTools
-            .getBytesUtf8( "secret" ) ) );
+        assertTrue( ArrayUtils.isEquals( entry.get( "userPassword" ).get().getBytes(), Strings
+            .getBytesUtf8("secret") ) );
         connection.close();
 
         service.shutdown();
@@ -102,8 +102,8 @@ public class SimpleAuthenticationIT exte
         connection = getConnectionAs( service, userDn, "secret" );
         entry = connection.lookup( userDn );;
         performAdminAccountChecks( entry );
-        assertTrue( ArrayUtils.isEquals( entry.get( "userPassword" ).get().getBytes(), StringTools
-            .getBytesUtf8( "secret" ) ) );
+        assertTrue( ArrayUtils.isEquals( entry.get( "userPassword" ).get().getBytes(), Strings
+            .getBytesUtf8("secret") ) );
         connection.close();
     }
 

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsAdminIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsAdminIT.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsAdminIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsAdminIT.java Sat Jan 22 20:08:48 2011
@@ -46,7 +46,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.SearchResultEntry;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.name.RDN;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -123,7 +123,7 @@ public class AuthorizationServiceAsAdmin
 
         connection = getConnectionAs( adminDn, newPwd );
         Entry entry = connection.lookup( adminDn.getName() );
-        assertTrue( ArrayUtils.isEquals( StringTools.getBytesUtf8( newPwd ), entry.get( "userPassword" ).get()
+        assertTrue( ArrayUtils.isEquals( Strings.getBytesUtf8(newPwd), entry.get( "userPassword" ).get()
             .getBytes() ) );
     }
 

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/ObjStateFactoryIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/ObjStateFactoryIT.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/ObjStateFactoryIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/ObjStateFactoryIT.java Sat Jan 22 20:08:48 2011
@@ -45,7 +45,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.shared.ldap.entry.DefaultEntry;
 import org.apache.directory.shared.ldap.ldif.LdifEntry;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -75,7 +75,7 @@ public class ObjStateFactoryIT extends A
         Person me = ( Person ) obj;
         assertEquals( attrs.get( "sn" ).get(), me.getLastname() );
         assertEquals( attrs.get( "cn" ).get(), me.getCn() );
-        assertTrue( ArrayUtils.isEquals( attrs.get( "userPassword" ).get(), StringTools.getBytesUtf8( "test" ) ) );
+        assertTrue( ArrayUtils.isEquals( attrs.get( "userPassword" ).get(), Strings.getBytesUtf8("test") ) );
         assertEquals( attrs.get( "telephonenumber" ).get(), me.getTelephoneNumber() );
         assertNull( me.getSeealso() );
         assertNull( me.getDescription() );
@@ -93,7 +93,7 @@ public class ObjStateFactoryIT extends A
         Attributes attrs = sysRoot.getAttributes( "sn=Rodriguez, ou=users" );
         assertEquals( "Rodriguez", attrs.get( "sn" ).get() );
         assertEquals( "Mr. Kerberos", attrs.get( "cn" ).get() );
-        assertTrue( ArrayUtils.isEquals( attrs.get( "userPassword" ).get(), StringTools.getBytesUtf8( "noices" ) ) );
+        assertTrue( ArrayUtils.isEquals( attrs.get( "userPassword" ).get(), Strings.getBytesUtf8("noices") ) );
         assertEquals( "555-1212", attrs.get( "telephonenumber" ).get() );
         assertEquals( "sn=erodriguez", attrs.get( "seealso" ).get() );
         assertEquals( "committer", attrs.get( "description" ).get() );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/compare/CompareDirserver1139IT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/compare/CompareDirserver1139IT.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/compare/CompareDirserver1139IT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/compare/CompareDirserver1139IT.java Sat Jan 22 20:08:48 2011
@@ -39,7 +39,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.integ.FrameworkRunner;
 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.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -176,7 +176,7 @@ public class CompareDirserver1139IT exte
         {
             SearchResult result = list.next();
             assertNotNull( result );
-            assertTrue( StringTools.isEmpty( result.getName() ) );
+            assertTrue( Strings.isEmpty(result.getName()) );
             assertNotNull( result.getAttributes() );
             assertEquals( 0, result.getAttributes().size() );
             count++;

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/modify/ModifyAddIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/modify/ModifyAddIT.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/modify/ModifyAddIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/modify/ModifyAddIT.java Sat Jan 22 20:08:48 2011
@@ -45,7 +45,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.annotations.CreateDS;
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.integ.FrameworkRunner;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.StringConstants;
 import org.junit.Test;
 import org.junit.runner.RunWith;
  
@@ -355,7 +355,7 @@ public class ModifyAddIT extends Abstrac
 
         // A valid AT not in MUST or MAY, but the extensibleObject OC is present in the OCs
         // The value is empty
-        Attributes attrs = new BasicAttributes( "crossCertificatePair", StringTools.EMPTY_BYTES, true );
+        Attributes attrs = new BasicAttributes( "crossCertificatePair", StringConstants.EMPTY_BYTES, true );
 
         // Add the AVA
         sysRoot.modifyAttributes( "ou=testing01", DirContext.ADD_ATTRIBUTE, attrs );
@@ -364,7 +364,7 @@ public class ModifyAddIT extends Abstrac
         attrs = sysRoot.getAttributes( "ou=testing01" );
         Attribute attr = attrs.get( "crossCertificatePair" );
         assertNotNull( attr );
-        assertTrue( attr.contains( StringTools.EMPTY_BYTES ) );
+        assertTrue( attr.contains( StringConstants.EMPTY_BYTES ) );
         assertEquals( 1, attr.size() );
     }
 
@@ -548,7 +548,7 @@ public class ModifyAddIT extends Abstrac
         // Add the first AVA
         sysRoot.modifyAttributes( "ou=testing01", DirContext.ADD_ATTRIBUTE, attrs );
 
-        attrs = new BasicAttributes( "crossCertificatePair", StringTools.EMPTY_BYTES, true );
+        attrs = new BasicAttributes( "crossCertificatePair", StringConstants.EMPTY_BYTES, true );
         
         // Add the second AVA
         sysRoot.modifyAttributes( "ou=testing01", DirContext.ADD_ATTRIBUTE, attrs );
@@ -558,7 +558,7 @@ public class ModifyAddIT extends Abstrac
         Attribute attr = attrs.get( "crossCertificatePair" );
         assertNotNull( attr );
         assertTrue( attr.contains( "12345".getBytes() ) );
-        assertTrue( attr.contains( StringTools.EMPTY_BYTES ) );
+        assertTrue( attr.contains( StringConstants.EMPTY_BYTES ) );
         assertEquals( 2, attr.size() );
     }
     

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/AbstractMetaSchemaObjectHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/AbstractMetaSchemaObjectHandler.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/AbstractMetaSchemaObjectHandler.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/AbstractMetaSchemaObjectHandler.java Sat Jan 22 20:08:48 2011
@@ -24,7 +24,7 @@ import java.io.File;
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.name.RDN;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.junit.Before;
 
 /**
@@ -57,7 +57,7 @@ public abstract class AbstractMetaSchema
         for ( RDN rdn : dn )
         {
             sb.append( '/' );
-            sb.append( StringTools.toLowerCase( rdn.getName() ) );
+            sb.append( Strings.toLowerCase(rdn.getName()) );
         }
 
         sb.append( ".ldif" );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java Sat Jan 22 20:08:48 2011
@@ -89,8 +89,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.schema.parsers.SyntaxCheckerDescriptionSchemaParser;
 import org.apache.directory.shared.ldap.schema.syntaxCheckers.OctetStringSyntaxChecker;
 import org.apache.directory.shared.ldap.schemaloader.SchemaEntityFactory;
-import org.apache.directory.shared.ldap.util.Base64;
-import org.apache.directory.shared.ldap.util.DateUtils;
+import org.apache.directory.shared.util.Base64;
+import org.apache.directory.shared.util.DateUtils;
 import org.apache.directory.shared.ldap.util.JndiUtils;
 import org.junit.Ignore;
 import org.junit.Test;
@@ -1929,7 +1929,7 @@ public class SubschemaSubentryIT extends
 
         Calendar cal = Calendar.getInstance( tz );
         String modifyTimestampStr = ( String ) modifyTimestampAttr.get();
-        Date modifyTimestamp = DateUtils.getDate( modifyTimestampStr );
+        Date modifyTimestamp = DateUtils.getDate(modifyTimestampStr);
         Date currentTimestamp = cal.getTime();
 
         assertFalse( modifyTimestamp.after( currentTimestamp ) );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/sp/LdapClassLoaderIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/sp/LdapClassLoaderIT.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/sp/LdapClassLoaderIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/sp/LdapClassLoaderIT.java Sat Jan 22 20:08:48 2011
@@ -36,7 +36,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.server.core.jndi.ServerLdapContext;
-import org.apache.directory.shared.ldap.util.Base64;
+import org.apache.directory.shared.util.Base64;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -59,7 +59,7 @@ public class LdapClassLoaderIT extends A
         + "AAkAAAAdAAEAAQAAAAUqtwABsQAAAAEACgAAAAYAAQAAAAEACQALAAwAAQAJAAAAJQACAAEAAAA"
         + "JsgACEgO2AASxAAAAAQAKAAAACgACAAAABQAIAAYAAQANAAAAAgAO";
 
-    private static final byte[] HELLOWORLD_CLASS_BYTES = Base64.decode( HELLOWORLD_CLASS_BASE64.toCharArray() );
+    private static final byte[] HELLOWORLD_CLASS_BYTES = Base64.decode(HELLOWORLD_CLASS_BASE64.toCharArray());
 
 
     @Test

Modified: directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/CoreContextFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/CoreContextFactory.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/CoreContextFactory.java (original)
+++ directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/CoreContextFactory.java Sat Jan 22 20:08:48 2011
@@ -36,7 +36,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.util.JndiUtils;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 
 
 /**
@@ -140,7 +140,7 @@ public class CoreContextFactory implemen
         }
         else if ( value instanceof String )
         {
-            credential = StringTools.getBytesUtf8( (String)value );
+            credential = Strings.getBytesUtf8((String) value);
         }
         else if ( value instanceof byte[] )
         {

Modified: directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/LdapJndiProperties.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/LdapJndiProperties.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/LdapJndiProperties.java (original)
+++ directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/LdapJndiProperties.java Sat Jan 22 20:08:48 2011
@@ -30,7 +30,7 @@ import org.apache.directory.server.i18n.
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.name.DN;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 
 
 /**
@@ -252,7 +252,7 @@ public class LdapJndiProperties
         {
             if ( credobj instanceof String )
             {
-                props.credentials = StringTools.getBytesUtf8( ( String ) credobj );
+                props.credentials = Strings.getBytesUtf8((String) credobj);
             }
             else if ( credobj instanceof byte[] )
             {

Modified: directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java (original)
+++ directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java Sat Jan 22 20:08:48 2011
@@ -131,7 +131,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.apache.directory.shared.ldap.util.AttributeUtils;
 import org.apache.directory.shared.ldap.util.JndiUtils;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 
 
 /**
@@ -1426,7 +1426,7 @@ public abstract class ServerContext impl
      */
     public Object lookup( String name ) throws NamingException
     {
-        if ( StringTools.isEmpty( name ) )
+        if ( Strings.isEmpty(name) )
         {
             return lookup( new LdapName( "" ) );
         }

Modified: directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java (original)
+++ directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java Sat Jan 22 20:08:48 2011
@@ -45,7 +45,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.util.JndiUtils;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 
 
 /**
@@ -208,7 +208,7 @@ public class ServerLdapContext extends S
             }
             else if ( value instanceof byte[] )
             {
-                val = new StringValue( attributeType, StringTools.utf8ToString( (byte[])value ) );
+                val = new StringValue( attributeType, Strings.utf8ToString((byte[]) value) );
             }
             else
             {
@@ -219,7 +219,7 @@ public class ServerLdapContext extends S
         {
             if ( value instanceof String )
             {
-                val = new BinaryValue( attributeType, StringTools.getBytesUtf8( (String)value ) );
+                val = new BinaryValue( attributeType, Strings.getBytesUtf8((String) value) );
             }
             else if ( value instanceof byte[] )
             {

Modified: directory/apacheds/trunk/core-jndi/src/test/java/org/apache/directory/server/core/jndi/LdapJndiPropertiesTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-jndi/src/test/java/org/apache/directory/server/core/jndi/LdapJndiPropertiesTest.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/core-jndi/src/test/java/org/apache/directory/server/core/jndi/LdapJndiPropertiesTest.java (original)
+++ directory/apacheds/trunk/core-jndi/src/test/java/org/apache/directory/server/core/jndi/LdapJndiPropertiesTest.java Sat Jan 22 20:08:48 2011
@@ -28,9 +28,8 @@ import javax.naming.Context;
 import org.apache.commons.lang.ArrayUtils;
 import org.apache.directory.junit.tools.Concurrent;
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
-import org.apache.directory.server.core.jndi.LdapJndiProperties;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -84,7 +83,7 @@ public class LdapJndiPropertiesTest
         env.put( Context.PROVIDER_URL, "" );
         LdapJndiProperties props = LdapJndiProperties.getLdapJndiProperties( env );
         assertEquals( AuthenticationLevel.SIMPLE, props.getAuthenticationLevel() );
-        assertTrue( ArrayUtils.isEquals( StringTools.getBytesUtf8( "asdf" ), props.getCredentials() ) );
+        assertTrue( ArrayUtils.isEquals( Strings.getBytesUtf8("asdf"), props.getCredentials() ) );
     }
 
 
@@ -140,6 +139,6 @@ public class LdapJndiPropertiesTest
         env.put( Context.PROVIDER_URL, "" );
         LdapJndiProperties props = LdapJndiProperties.getLdapJndiProperties( env );
         assertEquals( AuthenticationLevel.STRONG, props.getAuthenticationLevel() );
-        assertTrue( ArrayUtils.isEquals( StringTools.getBytesUtf8( "asdf" ), props.getCredentials() ) );
+        assertTrue( ArrayUtils.isEquals( Strings.getBytesUtf8("asdf"), props.getCredentials() ) );
     }
 }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultCoreSession.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultCoreSession.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultCoreSession.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultCoreSession.java Sat Jan 22 20:08:48 2011
@@ -69,7 +69,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.name.RDN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.AttributeTypeOptions;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 
 
 /**
@@ -207,7 +207,7 @@ public class DefaultCoreSession implemen
             }
             else if ( value instanceof byte[] )
             {
-                val = new StringValue( attributeType, StringTools.utf8ToString( ( byte[] ) value ) );
+                val = new StringValue( attributeType, Strings.utf8ToString((byte[]) value) );
             }
             else
             {
@@ -218,7 +218,7 @@ public class DefaultCoreSession implemen
         {
             if ( value instanceof String )
             {
-                val = new BinaryValue( attributeType, StringTools.getBytesUtf8( ( String ) value ) );
+                val = new BinaryValue( attributeType, Strings.getBytesUtf8((String) value) );
             }
             else if ( value instanceof byte[] )
             {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java Sat Jan 22 20:08:48 2011
@@ -101,9 +101,9 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.name.RDN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
-import org.apache.directory.shared.ldap.util.DateUtils;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.DateUtils;
 import org.apache.directory.shared.ldap.util.tree.DnNode;
+import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -1559,7 +1559,7 @@ public class DefaultDirectoryService imp
 
                 String addedLine = line.trim();
 
-                if ( StringTools.isEmpty( addedLine ) )
+                if ( Strings.isEmpty(addedLine) )
                 {
                     continue;
                 }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/admin/AdministrativePointInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/admin/AdministrativePointInterceptor.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/admin/AdministrativePointInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/admin/AdministrativePointInterceptor.java Sat Jan 22 20:08:48 2011
@@ -82,8 +82,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.subtree.AdministrativeRole;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.ldap.util.tree.DnNode;
+import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -602,7 +602,7 @@ public class AdministrativePointIntercep
      */
     private void checkAddRole( Value<?> role, EntryAttribute adminPoint, DN dn ) throws LdapException
     {
-        String roleStr = StringTools.toLowerCase( StringTools.trim( role.getString() ) );
+        String roleStr = Strings.toLowerCase(Strings.trim(role.getString()));
 
         // Check that the added AdministrativeRole is valid
         if ( !ROLES.contains( roleStr ) )
@@ -657,7 +657,7 @@ public class AdministrativePointIntercep
      */
     private void checkDelRole( Value<?> role, EntryAttribute adminPoint, DN dn ) throws LdapException
     {
-        String roleStr = StringTools.toLowerCase( StringTools.trim( role.getString() ) );
+        String roleStr = Strings.toLowerCase(Strings.trim(role.getString()));
 
         // Check that the removed AdministrativeRole is valid
         if ( !ROLES.contains( roleStr ) )
@@ -801,7 +801,7 @@ public class AdministrativePointIntercep
      */
     private boolean isValidRole( String role )
     {
-        return ROLES.contains( StringTools.toLowerCase( StringTools.trim( role ) ) );
+        return ROLES.contains( Strings.toLowerCase(Strings.trim(role)) );
     }
 
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AbstractAuthenticator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AbstractAuthenticator.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AbstractAuthenticator.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AbstractAuthenticator.java Sat Jan 22 20:08:48 2011
@@ -42,7 +42,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.name.DN;
-import org.apache.directory.shared.ldap.util.DateUtils;
+import org.apache.directory.shared.util.DateUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java Sat Jan 22 20:08:48 2011
@@ -106,8 +106,9 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
-import org.apache.directory.shared.ldap.util.DateUtils;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.DateUtils;
+import org.apache.directory.shared.util.StringConstants;
+import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -623,7 +624,7 @@ public class AuthenticationInterceptor e
                 while ( itr.hasNext() )
                 {
                     Value<?> val = itr.next();
-                    PasswordHistory pwdh = new PasswordHistory( StringTools.utf8ToString( val.getBytes() ) );
+                    PasswordHistory pwdh = new PasswordHistory( Strings.utf8ToString(val.getBytes()) );
 
                     boolean matched = Arrays.equals( newPassword, pwdh.getPassword() );
 
@@ -891,7 +892,7 @@ public class AuthenticationInterceptor e
 
                 // remove creds so there is no security risk
                 bindContext.setCredentials( null );
-                clonedPrincipal.setUserPassword( StringTools.EMPTY_BYTES );
+                clonedPrincipal.setUserPassword( StringConstants.EMPTY_BYTES );
 
                 // authentication was successful
                 CoreSession session = new DefaultCoreSession( clonedPrincipal, directoryService );
@@ -1174,7 +1175,7 @@ public class AuthenticationInterceptor e
             }
         }
 
-        String strPassword = StringTools.utf8ToString( password );
+        String strPassword = Strings.utf8ToString(password);
         validatePasswordLength( strPassword, policyConfig );
         checkUsernameSubstring( username, strPassword, policyConfig );
         //        checkPasswordChars( strPassword );
@@ -1308,7 +1309,7 @@ public class AuthenticationInterceptor e
         }
 
         EntryAttribute pwdChangedTimeAt = userEntry.get( PWD_CHANGED_TIME_AT );
-        long changedTime = DateUtils.getDate( pwdChangedTimeAt.getString() ).getTime();
+        long changedTime = DateUtils.getDate(pwdChangedTimeAt.getString()).getTime();
 
         int pwdAge = ( int ) ( System.currentTimeMillis() - changedTime ) / 1000;
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/DelegatingAuthenticator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/DelegatingAuthenticator.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/DelegatingAuthenticator.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/DelegatingAuthenticator.java Sat Jan 22 20:08:48 2011
@@ -32,7 +32,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.BindResponse;
 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.Strings;
 
 
 /**
@@ -128,7 +128,7 @@ public class DelegatingAuthenticator ext
         {
             // Try to bind
             BindResponse bindResponse = ldapConnection.bind( bindContext.getDn(),
-                StringTools.utf8ToString( bindContext.getCredentials() ) );
+                Strings.utf8ToString(bindContext.getCredentials()) );
             
             if ( bindResponse.getLdapResult().getResultCode() != ResultCodeEnum.SUCCESS )
             {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/PasswordHistory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/PasswordHistory.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/PasswordHistory.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/PasswordHistory.java Sat Jan 22 20:08:48 2011
@@ -22,9 +22,9 @@ package org.apache.directory.server.core
 
 
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.util.Base64;
-import org.apache.directory.shared.ldap.util.DateUtils;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Base64;
+import org.apache.directory.shared.util.DateUtils;
+import org.apache.directory.shared.util.Strings;
 
 
 /**
@@ -87,7 +87,7 @@ public class PasswordHistory implements 
 
         sb.append( data );
 
-        return StringTools.getBytesUtf8( sb.toString() );
+        return Strings.getBytesUtf8(sb.toString());
     }
 
 
@@ -158,7 +158,7 @@ public class PasswordHistory implements 
     public static void main( String[] args )
     {
         byte[] pwdhBytes = new PasswordHistory( DateUtils.getGeneralizedTime(), "secret".getBytes() ).getHistoryValue();
-        PasswordHistory pwdHistory = new PasswordHistory( StringTools.utf8ToString( pwdhBytes ) );
+        PasswordHistory pwdHistory = new PasswordHistory( Strings.utf8ToString(pwdhBytes) );
         System.out.println( pwdHistory );
     }
 }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/PasswordUtil.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/PasswordUtil.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/PasswordUtil.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/PasswordUtil.java Sat Jan 22 20:08:48 2011
@@ -35,10 +35,10 @@ import org.apache.directory.server.core.
 import org.apache.directory.shared.ldap.constants.LdapSecurityConstants;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Value;
-import org.apache.directory.shared.ldap.util.Base64;
-import org.apache.directory.shared.ldap.util.DateUtils;
-import org.apache.directory.shared.ldap.util.StringTools;
-import org.apache.directory.shared.ldap.util.UnixCrypt;
+import org.apache.directory.shared.util.Base64;
+import org.apache.directory.shared.util.DateUtils;
+import org.apache.directory.shared.util.UnixCrypt;
+import org.apache.directory.shared.util.Strings;
 
 
 /**
@@ -125,7 +125,7 @@ public class PasswordUtil
      */
     public static byte[] createStoragePassword( String credentials, LdapSecurityConstants algorithm )
     {
-        return createStoragePassword( StringTools.getBytesUtf8( credentials ), algorithm );
+        return createStoragePassword( Strings.getBytesUtf8(credentials), algorithm );
     }
     
     
@@ -175,8 +175,8 @@ public class PasswordUtil
 
             if ( algorithm == LdapSecurityConstants.HASH_METHOD_CRYPT )
             {
-                sb.append( StringTools.utf8ToString( salt ) );
-                sb.append( StringTools.utf8ToString( hashedPassword ) );
+                sb.append( Strings.utf8ToString(salt) );
+                sb.append( Strings.utf8ToString(hashedPassword) );
             }
             else if ( salt != null )
             {
@@ -186,15 +186,15 @@ public class PasswordUtil
             }
             else
             {
-                sb.append( String.valueOf( Base64.encode( hashedPassword ) ) );
+                sb.append( String.valueOf( Base64.encode(hashedPassword) ) );
             }
         }
         else
         {
-            sb.append( StringTools.utf8ToString( hashedPassword ) );
+            sb.append( Strings.utf8ToString(hashedPassword) );
         }
         
-        return StringTools.getBytesUtf8( sb.toString() );
+        return Strings.getBytesUtf8(sb.toString());
     }
     
 
@@ -302,11 +302,11 @@ public class PasswordUtil
                 return digest( LdapSecurityConstants.HASH_METHOD_MD5, credentials, salt );
 
             case HASH_METHOD_CRYPT:
-                String saltWithCrypted = UnixCrypt.crypt( StringTools.utf8ToString( credentials ), StringTools
-                    .utf8ToString( salt ) );
+                String saltWithCrypted = UnixCrypt.crypt( Strings.utf8ToString(credentials), Strings
+                    .utf8ToString(salt) );
                 String crypted = saltWithCrypted.substring( 2 );
 
-                return StringTools.getBytesUtf8( crypted );
+                return Strings.getBytesUtf8(crypted);
 
             default:
                 return credentials;

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java Sat Jan 22 20:08:48 2011
@@ -57,9 +57,10 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.exception.LdapAuthenticationException;
 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.Base64;
+import org.apache.directory.shared.util.UnixCrypt;
+import org.apache.directory.shared.util.StringConstants;
+import org.apache.directory.shared.util.Strings;
 
 
 /**
@@ -295,7 +296,7 @@ public class SimpleAuthenticator extends
         // ---- assert that credentials match
         if ( userPasswordAttr == null )
         {
-            return StringTools.EMPTY_BYTES;
+            return StringConstants.EMPTY_BYTES;
         }
         else
         {
@@ -321,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 ) )
@@ -375,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
             {
@@ -385,7 +386,7 @@ public class SimpleAuthenticator extends
 
                 // calculate hashed value of password
                 byte[] fingerPrint = digest.digest( password );
-                char[] encoded = Base64.encode( fingerPrint );
+                char[] encoded = Base64.encode(fingerPrint);
 
                 // create return result of form "{alg}bbbbbbb"
                 return '{' + algorithm + '}' + new String( encoded );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/MemoryChangeLogStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/MemoryChangeLogStore.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/MemoryChangeLogStore.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/MemoryChangeLogStore.java Sat Jan 22 20:08:48 2011
@@ -42,7 +42,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.cursor.ListCursor;
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.ldif.LdifEntry;
-import org.apache.directory.shared.ldap.util.DateUtils;
+import org.apache.directory.shared.util.DateUtils;
 
 
 /**
@@ -477,7 +477,7 @@ public class MemoryChangeLogStore implem
     public ChangeLogEvent log( LdapPrincipal principal, LdifEntry forward, List<LdifEntry> reverses ) throws Exception
     {
         currentRevision++;
-        ChangeLogEvent event = new ChangeLogEvent( currentRevision, DateUtils.getGeneralizedTime(), 
+        ChangeLogEvent event = new ChangeLogEvent( currentRevision, DateUtils.getGeneralizedTime(),
                 principal, forward, reverses );
         events.add( event );
         return event;

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java Sat Jan 22 20:08:48 2011
@@ -62,7 +62,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.name.RDN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.UsageEnum;
-import org.apache.directory.shared.ldap.util.DateUtils;
+import org.apache.directory.shared.util.DateUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java Sat Jan 22 20:08:48 2011
@@ -93,7 +93,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.Normalizer;
 import org.apache.directory.shared.ldap.schema.UsageEnum;
-import org.apache.directory.shared.ldap.util.DateUtils;
+import org.apache.directory.shared.util.DateUtils;
 import org.apache.directory.shared.ldap.util.NamespaceTools;
 import org.apache.directory.shared.ldap.util.tree.DnNode;
 import org.slf4j.Logger;

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java Sat Jan 22 20:08:48 2011
@@ -46,7 +46,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.filter.SearchScope;
 import org.apache.directory.shared.ldap.name.DN;
 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;
 
@@ -95,7 +95,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/trunk/core/src/main/java/org/apache/directory/server/core/schema/AttributesFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/AttributesFactory.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/AttributesFactory.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/AttributesFactory.java Sat Jan 22 20:08:48 2011
@@ -44,7 +44,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.schema.SchemaObject;
 import org.apache.directory.shared.ldap.schema.SyntaxChecker;
 import org.apache.directory.shared.ldap.schema.registries.Schema;
-import org.apache.directory.shared.ldap.util.DateUtils;
+import org.apache.directory.shared.util.DateUtils;
 
 
 /**

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryModifier.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryModifier.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryModifier.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryModifier.java Sat Jan 22 20:08:48 2011
@@ -52,7 +52,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.schema.parsers.NormalizerDescription;
 import org.apache.directory.shared.ldap.schema.parsers.SyntaxCheckerDescription;
 import org.apache.directory.shared.ldap.schema.registries.Schema;
-import org.apache.directory.shared.ldap.util.Base64;
+import org.apache.directory.shared.util.Base64;
 
 
 /**
@@ -322,7 +322,7 @@ public class SchemaSubentryModifier
         if ( syntaxCheckerDescription.getBytecode() != null )
         {
             entry.put( MetaSchemaConstants.M_BYTECODE_AT, 
-                Base64.decode( syntaxCheckerDescription.getBytecode().toCharArray() ) );
+                Base64.decode(syntaxCheckerDescription.getBytecode().toCharArray()) );
         }
         
         if ( syntaxCheckerDescription.getDescription() != null )

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/security/CoreKeyStoreSpi.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/security/CoreKeyStoreSpi.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/security/CoreKeyStoreSpi.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/security/CoreKeyStoreSpi.java Sat Jan 22 20:08:48 2011
@@ -45,7 +45,7 @@ import org.apache.directory.server.i18n.
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.name.DN;
-import org.apache.directory.shared.ldap.util.SingletonEnumeration;
+import org.apache.directory.shared.util.SingletonEnumeration;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Modified: directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticatorOneWayEncryptedTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticatorOneWayEncryptedTest.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticatorOneWayEncryptedTest.java (original)
+++ directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticatorOneWayEncryptedTest.java Sat Jan 22 20:08:48 2011
@@ -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/trunk/core/src/test/java/org/apache/directory/server/core/changelog/MemoryChangeLogStoreTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/changelog/MemoryChangeLogStoreTest.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/changelog/MemoryChangeLogStoreTest.java (original)
+++ directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/changelog/MemoryChangeLogStoreTest.java Sat Jan 22 20:08:48 2011
@@ -44,8 +44,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.name.DN;
 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.DateUtils;
+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/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java (original)
+++ directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java Sat Jan 22 20:08:48 2011
@@ -41,8 +41,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.cursor.SingletonCursor;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.apache.directory.shared.ldap.schema.comparators.SerializableComparator;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.ldap.util.SynchronizedLRUMap;
+import org.apache.directory.shared.util.StringConstants;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -671,7 +671,7 @@ public class JdbmTable<K,V> implements T
             }
             
             BTree tree = getBTree( values.getBTreeRedirect() );
-            replaced = ( V ) tree.insert( value, StringTools.EMPTY_BYTES, true );
+            replaced = ( V ) tree.insert( value, StringConstants.EMPTY_BYTES, true );
             
             if ( replaced == null )
             {
@@ -1130,7 +1130,7 @@ public class JdbmTable<K,V> implements T
         
         while ( keys.next() )
         {
-            bTree.insert( keys.get(), (K)StringTools.EMPTY_BYTES, true );
+            bTree.insert( keys.get(), (K) StringConstants.EMPTY_BYTES, true );
         }
         
         return bTree;

Modified: directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ServerEntrySerializerTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ServerEntrySerializerTest.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ServerEntrySerializerTest.java (original)
+++ directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ServerEntrySerializerTest.java Sat Jan 22 20:08:48 2011
@@ -44,7 +44,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.schemaloader.LdifSchemaLoader;
 import org.apache.directory.shared.ldap.schemamanager.impl.DefaultSchemaManager;
 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/trunk/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/ChangePassword.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/ChangePassword.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/ChangePassword.java (original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/ChangePassword.java Sat Jan 22 20:08:48 2011
@@ -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/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/KerberosTime.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/KerberosTime.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/KerberosTime.java (original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/KerberosTime.java Sat Jan 22 20:08:48 2011
@@ -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/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/KerberosUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/KerberosUtils.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/KerberosUtils.java (original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/KerberosUtils.java Sat Jan 22 20:08:48 2011
@@ -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/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadKerberosTime.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadKerberosTime.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadKerberosTime.java (original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadKerberosTime.java Sat Jan 22 20:08:48 2011
@@ -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/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadRealm.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadRealm.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadRealm.java (original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/actions/AbstractReadRealm.java Sat Jan 22 20:08:48 2011
@@ -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/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/etypeInfo2Entry/actions/StoreSalt.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/etypeInfo2Entry/actions/StoreSalt.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/etypeInfo2Entry/actions/StoreSalt.java (original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/etypeInfo2Entry/actions/StoreSalt.java Sat Jan 22 20:08:48 2011
@@ -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/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/hostAddress/actions/StoreAddress.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/hostAddress/actions/StoreAddress.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/hostAddress/actions/StoreAddress.java (original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/hostAddress/actions/StoreAddress.java Sat Jan 22 20:08:48 2011
@@ -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/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcReqBody/actions/StoreFrom.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcReqBody/actions/StoreFrom.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcReqBody/actions/StoreFrom.java (original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcReqBody/actions/StoreFrom.java Sat Jan 22 20:08:48 2011
@@ -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/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcReqBody/actions/StoreTill.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcReqBody/actions/StoreTill.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcReqBody/actions/StoreTill.java (original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/kdcReqBody/actions/StoreTill.java Sat Jan 22 20:08:48 2011
@@ -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/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbError/actions/StoreEText.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbError/actions/StoreEText.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbError/actions/StoreEText.java (original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbError/actions/StoreEText.java Sat Jan 22 20:08:48 2011
@@ -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/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/principalName/actions/StoreNameString.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/principalName/actions/StoreNameString.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/principalName/actions/StoreNameString.java (original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/principalName/actions/StoreNameString.java Sat Jan 22 20:08:48 2011
@@ -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 ) );
     



Mime
View raw message