directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1062251 [13/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/directo...
Date Sat, 22 Jan 2011 20:08:59 GMT
Copied: directory/shared/trunk/util/src/test/java/org/apache/directory/shared/util/ByteBufferTest.java
(from r1062128, directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/ByteBufferTest.java)
URL: http://svn.apache.org/viewvc/directory/shared/trunk/util/src/test/java/org/apache/directory/shared/util/ByteBufferTest.java?p2=directory/shared/trunk/util/src/test/java/org/apache/directory/shared/util/ByteBufferTest.java&p1=directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/ByteBufferTest.java&r1=1062128&r2=1062251&rev=1062251&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/ByteBufferTest.java
(original)
+++ directory/shared/trunk/util/src/test/java/org/apache/directory/shared/util/ByteBufferTest.java
Sat Jan 22 20:08:48 2011
@@ -17,13 +17,14 @@
  *  under the License. 
  *  
  */
-package org.apache.directory.shared.ldap.util;
+package org.apache.directory.shared.util;
 
 
 import static org.junit.Assert.assertEquals;
 
 import org.apache.directory.junit.tools.Concurrent;
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
+import org.apache.directory.shared.util.ByteBuffer;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -41,48 +42,48 @@ public class ByteBufferTest
     public void testByteBufferGrowth()
     {
         ByteBuffer buf = new ByteBuffer();
-        assertEquals( 10, buf.capacity() );
+        assertEquals(10, buf.capacity());
         
         for ( int ii = 0; ii < 20; ii++ )
         {
             buf.append( ii );
-            assertEquals( ii, buf.get( ii ) );
-            assertEquals( ii, buf.buffer()[ii] );
+            assertEquals(ii, buf.get(ii));
+            assertEquals(ii, buf.buffer()[ii]);
         }
         
-        assertEquals( 20, buf.capacity() );
+        assertEquals(20, buf.capacity());
         buf.append( 20 );
-        assertEquals( 30, buf.capacity() );
+        assertEquals(30, buf.capacity());
 
         // -------------------------------------------------------------------
         
         buf = new ByteBuffer( 5 );
-        assertEquals( 5, buf.capacity() );
+        assertEquals(5, buf.capacity());
         
         for ( int ii = 0; ii < 5; ii++ )
         {
             buf.append( ii );
-            assertEquals( ii, buf.get( ii ) );
-            assertEquals( ii, buf.buffer()[ii] );
+            assertEquals(ii, buf.get(ii));
+            assertEquals(ii, buf.buffer()[ii]);
         }
         
-        assertEquals( 5, buf.capacity() );
+        assertEquals(5, buf.capacity());
         buf.append( 5 );
-        assertEquals( 10, buf.capacity() );
+        assertEquals(10, buf.capacity());
     }
     
     public void testCopyOfUsedBytes()
     {
         ByteBuffer buf = new ByteBuffer();
         byte[] bytes = buf.copyOfUsedBytes();
-        assertEquals( 0, bytes.length );
+        assertEquals(0, bytes.length);
         
         for ( int ii = 0; ii < 20; ii++ )
         {
             buf.append( ii );
-            assertEquals( ii, buf.get( ii ) );
-            assertEquals( ii, buf.buffer()[ii] );
-            assertEquals( ii, buf.copyOfUsedBytes()[ii] );
+            assertEquals(ii, buf.get(ii));
+            assertEquals(ii, buf.buffer()[ii]);
+            assertEquals(ii, buf.copyOfUsedBytes()[ii]);
         }
     }
     
@@ -92,9 +93,9 @@ public class ByteBufferTest
         buf.append( new byte[]{ 0, 1, 2, 3, 4 } );
         for ( int ii = 0; ii < 5; ii++ )
         {
-            assertEquals( ii, buf.get( ii ) );
-            assertEquals( ii, buf.buffer()[ii] );
-            assertEquals( ii, buf.copyOfUsedBytes()[ii] );
+            assertEquals(ii, buf.get(ii));
+            assertEquals(ii, buf.buffer()[ii]);
+            assertEquals(ii, buf.copyOfUsedBytes()[ii]);
         }
     }
 }

Propchange: directory/shared/trunk/util/src/test/java/org/apache/directory/shared/util/ByteBufferTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: directory/shared/trunk/util/src/test/java/org/apache/directory/shared/util/JoinIteratorTest.java
(from r1062128, directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/JoinIteratorTest.java)
URL: http://svn.apache.org/viewvc/directory/shared/trunk/util/src/test/java/org/apache/directory/shared/util/JoinIteratorTest.java?p2=directory/shared/trunk/util/src/test/java/org/apache/directory/shared/util/JoinIteratorTest.java&p1=directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/JoinIteratorTest.java&r1=1062128&r2=1062251&rev=1062251&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/JoinIteratorTest.java
(original)
+++ directory/shared/trunk/util/src/test/java/org/apache/directory/shared/util/JoinIteratorTest.java
Sat Jan 22 20:08:48 2011
@@ -17,7 +17,7 @@
  *  under the License. 
  *  
  */
-package org.apache.directory.shared.ldap.util;
+package org.apache.directory.shared.util;
 
 
 import static org.junit.Assert.assertEquals;
@@ -33,6 +33,7 @@ import java.util.List;
 
 import org.apache.directory.junit.tools.Concurrent;
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
+import org.apache.directory.shared.util.JoinIterator;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 

Propchange: directory/shared/trunk/util/src/test/java/org/apache/directory/shared/util/JoinIteratorTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/AbstractServerXmlIO.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/AbstractServerXmlIO.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/AbstractServerXmlIO.java
(original)
+++ directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/AbstractServerXmlIO.java
Sat Jan 22 20:08:48 2011
@@ -30,7 +30,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.ldif.LdifReader;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.apache.directory.studio.apacheds.configuration.StudioEntityResolver;
 import org.dom4j.Document;
 import org.dom4j.Element;
@@ -208,7 +208,7 @@ public abstract class AbstractServerXmlI
 
                 String addedLine = line.trim();
 
-                if ( StringTools.isEmpty( addedLine ) )
+                if ( Strings.isEmpty(addedLine) )
                 {
                     continue;
                 }

Modified: directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/Utils.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/Utils.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/Utils.java
(original)
+++ directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/Utils.java
Sat Jan 22 20:08:48 2011
@@ -30,7 +30,7 @@ import javax.naming.directory.SearchCont
 import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
 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.apache.directory.studio.connection.core.Connection.AliasDereferencingMethod;
 import org.apache.directory.studio.connection.core.ConnectionParameter.EncryptionMethod;
 
@@ -146,7 +146,7 @@ public class Utils
             return null;
         }
 
-        byte[] b = StringTools.getBytesUtf8( s );
+        byte[] b = Strings.getBytesUtf8(s);
         StringBuffer sb = new StringBuffer();
         for ( int i = 0; i < b.length; i++ )
         {

Modified: directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/BrowserConnectionIO.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/BrowserConnectionIO.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/BrowserConnectionIO.java
(original)
+++ directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/BrowserConnectionIO.java
Sat Jan 22 20:08:48 2011
@@ -34,7 +34,7 @@ import java.util.Map;
 
 import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.name.DN;
-import org.apache.directory.shared.ldap.util.Base64;
+import org.apache.directory.shared.util.Base64;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.StudioControl;
 import org.apache.directory.studio.connection.core.io.ConnectionIOException;
@@ -499,7 +499,7 @@ public class BrowserConnectionIO
             oos.writeObject( studioControl );
             oos.close();
             byte[] bytes = baos.toByteArray();
-            String controlsValue = new String( Base64.encode( bytes ) );
+            String controlsValue = new String( Base64.encode(bytes) );
 
             Element controlElement = controlsElement.addElement( CONTROL_TAG );
             controlElement.addAttribute( VALUE_TAG, controlsValue );

Modified: directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/time/GeneralizedTimeValueDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/time/GeneralizedTimeValueDialog.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/time/GeneralizedTimeValueDialog.java
(original)
+++ directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/time/GeneralizedTimeValueDialog.java
Sat Jan 22 20:08:48 2011
@@ -31,7 +31,7 @@ import java.util.Map;
 import java.util.SimpleTimeZone;
 import java.util.TimeZone;
 
-import org.apache.directory.shared.ldap.util.GeneralizedTime;
+import org.apache.directory.shared.util.GeneralizedTime;
 import org.apache.directory.studio.common.ui.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.valueeditors.ValueEditorsActivator;
 import org.apache.directory.studio.valueeditors.ValueEditorsConstants;

Modified: directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/time/GeneralizedTimeValueEditor.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/time/GeneralizedTimeValueEditor.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/time/GeneralizedTimeValueEditor.java
(original)
+++ directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/time/GeneralizedTimeValueEditor.java
Sat Jan 22 20:08:48 2011
@@ -26,7 +26,7 @@ import java.text.ParseException;
 import java.util.Calendar;
 import java.util.Date;
 
-import org.apache.directory.shared.ldap.util.GeneralizedTime;
+import org.apache.directory.shared.util.GeneralizedTime;
 import org.apache.directory.studio.ldapbrowser.common.dialogs.TextDialog;
 import org.apache.directory.studio.ldapbrowser.core.model.IValue;
 import org.apache.directory.studio.valueeditors.AbstractDialogStringValueEditor;

Modified: directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/uuid/InPlaceUuidValueEditor.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/uuid/InPlaceUuidValueEditor.java?rev=1062251&r1=1062250&r2=1062251&view=diff
==============================================================================
--- directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/uuid/InPlaceUuidValueEditor.java
(original)
+++ directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/uuid/InPlaceUuidValueEditor.java
Sat Jan 22 20:08:48 2011
@@ -22,7 +22,7 @@ package org.apache.directory.studio.valu
 
 
 import org.apache.commons.codec.binary.Hex;
-import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.shared.util.Strings;
 import org.apache.directory.studio.ldapbrowser.core.model.IValue;
 import org.apache.directory.studio.valueeditors.HexValueEditor;
 
@@ -51,8 +51,8 @@ public class InPlaceUuidValueEditor exte
             if ( rawValue instanceof byte[] )
             {
                 byte[] bytes = ( byte[] ) rawValue;
-                String string = StringTools.utf8ToString( bytes );
-                if ( string.matches( UUID_REGEX ) || StringTools.isEmpty( string ) )
+                String string = Strings.utf8ToString(bytes);
+                if ( string.matches( UUID_REGEX ) || Strings.isEmpty(string) )
                 {
                     return string;
                 }



Mime
View raw message