You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2012/09/25 17:26:11 UTC

svn commit: r1389918 - /directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/SearchResultEntryDecorator.java

Author: elecharny
Date: Tue Sep 25 15:26:11 2012
New Revision: 1389918

URL: http://svn.apache.org/viewvc?rev=1389918&view=rev
Log:
Called the fast getBytesUtf8Ascii method for DN and AttributeId

Modified:
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/SearchResultEntryDecorator.java

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/SearchResultEntryDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/SearchResultEntryDecorator.java?rev=1389918&r1=1389917&r2=1389918&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/SearchResultEntryDecorator.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/SearchResultEntryDecorator.java Tue Sep 25 15:26:11 2012
@@ -305,7 +305,7 @@ public class SearchResultEntryDecorator 
     {
         Dn dn = getObjectName();
 
-        byte[] dnBytes = Strings.getBytesUtf8( dn.getName() );
+        byte[] dnBytes = Strings.getBytesUtf8Ascii( dn.getName() );
 
         // The entry
         int searchResultEntryLength = 1 + TLV.getNbBytes( dnBytes.length ) + dnBytes.length;
@@ -333,7 +333,7 @@ public class SearchResultEntryDecorator 
                 int localValuesLength = 0;
 
                 // Get the type length
-                byte[] attributeIdBytes = Strings.getBytesUtf8( attribute.getUpId() );
+                byte[] attributeIdBytes = Strings.getBytesUtf8Ascii( attribute.getUpId() );
                 attributeIds.add( attributeIdBytes );
                 int idLength = attributeIdBytes.length;
                 localAttributeLength = 1 + TLV.getNbBytes( idLength ) + idLength;
@@ -355,10 +355,10 @@ public class SearchResultEntryDecorator 
                     }
                     else
                     {
-                        // We have to deal with the special wase where
+                        // We have to deal with the special case where
                         // we don't have a value.
                         // It will be encoded as an empty OCTETSTRING,
-                        // so it will be two byte slong (0x04 0x00)
+                        // so it will be two bytes long (0x04 0x00)
                         localAttributeLength += 1 + 1;
                     }
                 }