directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r366053 - /directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/codec/search/SearchResultEntry.java
Date Thu, 05 Jan 2006 01:47:23 GMT
Author: elecharny
Date: Wed Jan  4 17:47:12 2006
New Revision: 366053

URL: http://svn.apache.org/viewcvs?rev=366053&view=rev
Log:
- Fixed a bug in computeLength() with null values attributes
- Fixed a bug in toString() : attributes were not dumped

Modified:
    directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/codec/search/SearchResultEntry.java

Modified: directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/codec/search/SearchResultEntry.java
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/codec/search/SearchResultEntry.java?rev=366053&r1=366052&r2=366053&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/codec/search/SearchResultEntry.java
(original)
+++ directory/trunk/ldap-common/src/main/java/org/apache/ldap/common/codec/search/SearchResultEntry.java
Wed Jan  4 17:47:12 2006
@@ -276,6 +276,14 @@
 
                         localAttributeLength += 1 + Length.getNbBytes( localValuesLength
) + localValuesLength; 
 	                }
+	                else
+	                {
+	                	// We have to deal with the special wase where
+	                	// we don't have a value.
+	                	// It will be encoded as an empty OCTETSTRING,
+	                	// so it will be two byte slong (0x04 0x00)
+	                	localAttributeLength += 1 + 1;
+	                }
 	                
                 }
                 catch (NamingException ne)
@@ -425,7 +433,7 @@
         }
         else
         {
-            AttributeUtils.toString( "            ", partialAttributeList );
+            sb.append( AttributeUtils.toString( "            ", partialAttributeList ) );
         }
 
         return sb.toString();



Mime
View raw message