directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r453328 - in /directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec: LdapResult.java search/SearchResultEntry.java
Date Thu, 05 Oct 2006 19:33:51 GMT
Author: akarasulu
Date: Thu Oct  5 12:33:51 2006
New Revision: 453328

URL: http://svn.apache.org/viewvc?view=rev&rev=453328
Log:
reverting commit 453136 made to fix DIRSERVER-756: breaks LDAPv3 conformance tests ;)

Modified:
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResult.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntry.java

Modified: directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResult.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResult.java?view=diff&rev=453328&r1=453327&r2=453328
==============================================================================
--- directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResult.java
(original)
+++ directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResult.java
Thu Oct  5 12:33:51 2006
@@ -101,9 +101,6 @@
 
     /** The DN that is matched by the Bind */
     private LdapDN matchedDN;
-    
-    /** Temporary storage of the byte[] representing the matchedDN */
-    private transient byte[] matchedDNBytes;
 
     /** The error message */
     private String errorMessage;
@@ -266,8 +263,7 @@
         }
         else
         {
-            matchedDNBytes = StringTools.getBytesUtf8( matchedDN.getUpName() );
-            ldapResultLength += 1 + TLV.getNbBytes( matchedDNBytes.length ) + matchedDNBytes.length;
+            ldapResultLength += 1 + TLV.getNbBytes( LdapDN.getNbBytes( matchedDN ) ) + LdapDN.getNbBytes(
matchedDN );
         }
 
         // The errorMessage length
@@ -322,7 +318,7 @@
         }
 
         // The matchedDN
-        Value.encode( buffer, matchedDNBytes );
+        Value.encode( buffer, LdapDN.getBytes( matchedDN ) );
 
         // The error message
         Value.encode( buffer, errorMessageBytes );

Modified: directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntry.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntry.java?view=diff&rev=453328&r1=453327&r2=453328
==============================================================================
--- directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntry.java
(original)
+++ directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntry.java
Thu Oct  5 12:33:51 2006
@@ -71,9 +71,6 @@
     /** The DN of the returned entry */
     private LdapDN objectName;
 
-    /** A temporary storage for the byte[] representing the objectName */ 
-    private transient byte[] objectNameBytes;
-
     /** The attributes list. It contains javax.naming.directory.Attribute */
     private Attributes partialAttributeList;
 
@@ -228,10 +225,9 @@
      */
     public int computeLength()
     {
-        objectNameBytes = StringTools.getBytesUtf8( objectName.getUpName() );
-        
         // The entry
-        searchResultEntryLength = 1 + TLV.getNbBytes( objectNameBytes.length ) + objectNameBytes.length;
+        searchResultEntryLength = 1 + TLV.getNbBytes( LdapDN.getNbBytes( objectName ) )
+            + LdapDN.getNbBytes( objectName );
 
         // The attributes sequence
         attributesLength = 0;
@@ -363,7 +359,7 @@
             buffer.put( TLV.getBytes( searchResultEntryLength ) );
 
             // The objectName
-            Value.encode( buffer, objectNameBytes );
+            Value.encode( buffer, LdapDN.getBytes( objectName ) );
 
             // The attributes sequence
             buffer.put( UniversalTag.SEQUENCE_TAG );



Mime
View raw message