directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: rev 57583 - in incubator/directory/ldap/trunk/common: . src/java/org/apache/ldap/common/message src/test/org/apache/ldap/common/message
Date Sat, 13 Nov 2004 17:40:47 GMT
Author: akarasulu
Date: Sat Nov 13 09:40:46 2004
New Revision: 57583

Modified:
   incubator/directory/ldap/trunk/common/project.properties
   incubator/directory/ldap/trunk/common/sample.build.properties
   incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/message/LockableAttributeImpl.java
   incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/message/LockableAttributesImpl.java
   incubator/directory/ldap/trunk/common/src/test/org/apache/ldap/common/message/LockableAttributesImplTest.java
Log:
Changes ...

 o removed old ldapd specific properties
 o added test to fix toString when byte[]s are used as attribute values



Modified: incubator/directory/ldap/trunk/common/project.properties
==============================================================================
--- incubator/directory/ldap/trunk/common/project.properties	(original)
+++ incubator/directory/ldap/trunk/common/project.properties	Sat Nov 13 09:40:46 2004
@@ -2,8 +2,8 @@
 maven.ui.source.background=#fff
 maven.ui.section.background=#6a82b6
 maven.xdoc.date=left
-maven.xdoc.version=0.7.1
-maven.xdoc.developmentProcessUrl=http://ldapd.sourceforge.net/devprocess.html
+maven.xdoc.version=0.7.5
+maven.xdoc.developmentProcessUrl=http://incubator.apache.org/directory
 
 # Override the Modules path in build.properties
 # This defines the directory under which all of

Modified: incubator/directory/ldap/trunk/common/sample.build.properties
==============================================================================
--- incubator/directory/ldap/trunk/common/sample.build.properties	(original)
+++ incubator/directory/ldap/trunk/common/sample.build.properties	Sat Nov 13 09:40:46 2004
@@ -3,7 +3,3 @@
 # layout/paths
 #
 
-# eclipse configuration
-maven.eclipse.workspace=C:/cygwin/home/Administrator/projects/ldapd/HEAD
-maven.checkstyle.properties=C:/cygwin/home/Administrator/projects/ldapd/HEAD/sandbox0/toolconfigs/checkstyle/default_checks.xml
-

Modified: incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/message/LockableAttributeImpl.java
==============================================================================
--- incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/message/LockableAttributeImpl.java
(original)
+++ incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/message/LockableAttributeImpl.java
Sat Nov 13 09:40:46 2004
@@ -32,8 +32,8 @@
 /**
  * Permanently Lockable ordered JNDI Attribute implementation.
  *
- * @author <a href="mailto:directory-dev@incubator.apache.org"> Apache Directory
- *         Project</a> $Rev$
+ * @author <a href="mailto:directory-dev@incubator.apache.org"> Apache Directory Project</a>
+ * @version $Rev$
  */
 public class LockableAttributeImpl
     extends AbstractLockable implements LockableAttribute

Modified: incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/message/LockableAttributesImpl.java
==============================================================================
--- incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/message/LockableAttributesImpl.java
(original)
+++ incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/message/LockableAttributesImpl.java
Sat Nov 13 09:40:46 2004
@@ -301,7 +301,7 @@
                 NamingEnumeration l_values = l_attr.getAll();
                 while ( l_values.hasMore() )
                 {
-                    String l_value = ( String ) l_values.next();
+                    Object l_value = l_values.next();
                     l_buf.append( l_attr.getID() );
                     l_buf.append( ": " );
                     l_buf.append( l_value );

Modified: incubator/directory/ldap/trunk/common/src/test/org/apache/ldap/common/message/LockableAttributesImplTest.java
==============================================================================
--- incubator/directory/ldap/trunk/common/src/test/org/apache/ldap/common/message/LockableAttributesImplTest.java
(original)
+++ incubator/directory/ldap/trunk/common/src/test/org/apache/ldap/common/message/LockableAttributesImplTest.java
Sat Nov 13 09:40:46 2004
@@ -21,6 +21,8 @@
 
 import javax.naming.directory.BasicAttributes;
 
+import org.apache.ldap.common.util.ArrayUtils;
+
 
 /**
  * Test cases for the methods of the LockableAttributeImpl class.
@@ -58,6 +60,22 @@
         attrs.put( getAttribute( "attr1" ) );
         attrs.put( getAttribute( "attr2" ) );
         return attrs;
+    }
+
+
+    /**
+     * Tests that toString works properly.
+     */
+    public void testToString()
+    {
+        LockableAttributesImpl attrs = getAttributes();
+        attrs.put( "binaryNullAttr", null );
+        attrs.put( "binaryEmptyAttr", ArrayUtils.EMPTY_BYTE_ARRAY );
+        attrs.put( "binaryFullAttr", new byte[]{ 0x44, 0x23 } );
+        String str = attrs.toString();
+        assertTrue( str.indexOf( "binaryNullAttr" ) != -1 );
+        assertTrue( str.indexOf( "binaryEmptyAttr" ) != -1 );
+        assertTrue( str.indexOf( "binaryFullAttr" ) != -1 );
     }
 
 

Mime
View raw message