directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1063063 - /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractMessage.java
Date Mon, 24 Jan 2011 23:37:42 GMT
Author: akarasulu
Date: Mon Jan 24 23:37:42 2011
New Revision: 1063063

URL: http://svn.apache.org/viewvc?rev=1063063&view=rev
Log:
cleaning up length computation code after using decorator

Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractMessage.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractMessage.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractMessage.java?rev=1063063&r1=1063062&r2=1063063&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractMessage.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractMessage.java
Mon Jan 24 23:37:42 2011
@@ -22,7 +22,6 @@ package org.apache.directory.shared.ldap
 
 import java.util.Collections;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.Map;
 
 import org.apache.directory.shared.ldap.model.exception.MessageException;
@@ -43,9 +42,6 @@ public abstract class AbstractMessage im
     /** Map of message controls using OID Strings for keys and Control values */
     protected final Map<String, Control> controls;
 
-    /** The encoded controls length */
-    private int controlsLength;
-
     /** The session unique message sequence identifier */
     private int id;
 
@@ -58,9 +54,6 @@ public abstract class AbstractMessage im
     /** The current control */
     private Control currentControl;
 
-    /** The encoded message length */
-    private int messageLength;
-
 
     /**
      * Completes the instantiation of a Message.
@@ -244,11 +237,9 @@ public abstract class AbstractMessage im
             return false;
         }
 
-        Iterator<String> list = this.controls.keySet().iterator();
-
-        while ( list.hasNext() )
+        for ( String key : this.controls.keySet() )
         {
-            if ( !controls.containsKey( list.next() ) )
+            if ( ! controls.containsKey( key ) )
             {
                 return false;
             }
@@ -286,42 +277,6 @@ public abstract class AbstractMessage im
     }
 
 
-//    /**
-//     * {@inheritDoc}
-//     */
-//    /* No qualifier*/void setControlsLength( int controlsLength )
-//    {
-//        this.controlsLength = controlsLength;
-//    }
-//
-//
-//    /**
-//     * {@inheritDoc}
-//     */
-//    /* No qualifier*/int getControlsLength()
-//    {
-//        return controlsLength;
-//    }
-//
-//
-//    /**
-//     * {@inheritDoc}
-//     */
-//    /* No qualifier*/void setMessageLength( int messageLength )
-//    {
-//        this.messageLength = messageLength;
-//    }
-//
-//
-//    /**
-//     * {@inheritDoc}
-//     */
-//    /* No qualifier*/int getMessageLength()
-//    {
-//        return messageLength;
-//    }
-
-
     /**
      * Get a String representation of a LdapMessage
      * 



Mime
View raw message