directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r693466 - /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntry.java
Date Tue, 09 Sep 2008 14:07:19 GMT
Author: pamarcelot
Date: Tue Sep  9 07:07:18 2008
New Revision: 693466

URL: http://svn.apache.org/viewvc?rev=693466&view=rev
Log:
o Updated javadoc.
o Code formatting.

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

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntry.java?rev=693466&r1=693465&r2=693466&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntry.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntry.java
Tue Sep  9 07:07:18 2008
@@ -69,7 +69,7 @@
     // ~ Instance fields
     // ----------------------------------------------------------------------------
 
-    /** A temporary storage for the byte[] representing the objectName */ 
+    /** A temporary storage for the byte[] representing the objectName */
     private byte[] objectNameBytes;
 
     /** The entry */
@@ -151,7 +151,10 @@
 
 
     /**
-     * Initialize the entry.
+     * Sets the entry.
+     *
+     * @param entry
+     *      the entry
      */
     public void setEntry( Entry entry )
     {
@@ -188,11 +191,11 @@
     {
         if ( value instanceof String )
         {
-            currentAttributeValue.add( (String)value );
+            currentAttributeValue.add( ( String ) value );
         }
         else
         {
-            currentAttributeValue.add( (byte[])value );
+            currentAttributeValue.add( ( byte[] ) value );
         }
     }
 
@@ -240,7 +243,7 @@
     public int computeLength()
     {
         objectNameBytes = StringTools.getBytesUtf8( entry.getDn().getUpName() );
-        
+
         // The entry
         searchResultEntryLength = 1 + TLV.getNbBytes( objectNameBytes.length ) + objectNameBytes.length;
 
@@ -253,7 +256,7 @@
             valsLength = new LinkedList<Integer>();
 
             // Compute the attributes length
-            for ( EntryAttribute attribute:entry )
+            for ( EntryAttribute attribute : entry )
             {
                 int localAttributeLength = 0;
                 int localValuesLength = 0;
@@ -269,7 +272,7 @@
                     {
                         localValuesLength = 0;
 
-                        for ( org.apache.directory.shared.ldap.entry.Value<?> value:attribute
)
+                        for ( org.apache.directory.shared.ldap.entry.Value<?> value
: attribute )
                         {
                             if ( value instanceof ClientStringValue )
                             {
@@ -281,8 +284,7 @@
                             else
                             {
                                 byte[] binaryValue = ( byte[] ) value.get();
-                                localValuesLength += 1 + TLV.getNbBytes( binaryValue.length
)
-                                    + binaryValue.length;
+                                localValuesLength += 1 + TLV.getNbBytes( binaryValue.length
) + binaryValue.length;
                             }
 
                         }
@@ -371,7 +373,7 @@
                 int attributeNumber = 0;
 
                 // Compute the attributes length
-                for ( EntryAttribute attribute:entry )
+                for ( EntryAttribute attribute : entry )
                 {
                     // The partial attribute list sequence
                     buffer.put( UniversalTag.SEQUENCE_TAG );
@@ -390,7 +392,7 @@
                     {
                         if ( attribute.size() > 0 )
                         {
-                            for ( org.apache.directory.shared.ldap.entry.Value<?> value:attribute
)
+                            for ( org.apache.directory.shared.ldap.entry.Value<?> value
: attribute )
                             {
                                 if ( value instanceof ClientStringValue )
                                 {



Mime
View raw message