directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r986765 - in /directory/shared/branches/shared-codec-merge/ldap/src/main/java/org/apache/directory/shared/ldap/message: AbstractMessage.java LdapProtocolEncoder.java Message.java
Date Wed, 18 Aug 2010 16:07:19 GMT
Author: elecharny
Date: Wed Aug 18 16:07:18 2010
New Revision: 986765

URL: http://svn.apache.org/viewvc?rev=986765&view=rev
Log:
Modified some methods to make them package protected instead of public

Modified:
    directory/shared/branches/shared-codec-merge/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractMessage.java
    directory/shared/branches/shared-codec-merge/ldap/src/main/java/org/apache/directory/shared/ldap/message/LdapProtocolEncoder.java
    directory/shared/branches/shared-codec-merge/ldap/src/main/java/org/apache/directory/shared/ldap/message/Message.java

Modified: directory/shared/branches/shared-codec-merge/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractMessage.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-codec-merge/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractMessage.java?rev=986765&r1=986764&r2=986765&view=diff
==============================================================================
--- directory/shared/branches/shared-codec-merge/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractMessage.java
(original)
+++ directory/shared/branches/shared-codec-merge/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractMessage.java
Wed Aug 18 16:07:18 2010
@@ -287,7 +287,7 @@ public abstract class AbstractMessage im
     /**
      * {@inheritDoc}
      */
-    public void setControlsLength( int controlsLength )
+    /* No qualifier*/void setControlsLength( int controlsLength )
     {
         this.controlsLength = controlsLength;
     }
@@ -296,7 +296,7 @@ public abstract class AbstractMessage im
     /**
      * {@inheritDoc}
      */
-    public int getControlsLength()
+    /* No qualifier*/int getControlsLength()
     {
         return controlsLength;
     }
@@ -305,7 +305,7 @@ public abstract class AbstractMessage im
     /**
      * {@inheritDoc}
      */
-    public void setMessageLength( int messageLength )
+    /* No qualifier*/void setMessageLength( int messageLength )
     {
         this.messageLength = messageLength;
     }
@@ -314,7 +314,7 @@ public abstract class AbstractMessage im
     /**
      * {@inheritDoc}
      */
-    public int getMessageLength()
+    /* No qualifier*/int getMessageLength()
     {
         return messageLength;
     }

Modified: directory/shared/branches/shared-codec-merge/ldap/src/main/java/org/apache/directory/shared/ldap/message/LdapProtocolEncoder.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-codec-merge/ldap/src/main/java/org/apache/directory/shared/ldap/message/LdapProtocolEncoder.java?rev=986765&r1=986764&r2=986765&view=diff
==============================================================================
--- directory/shared/branches/shared-codec-merge/ldap/src/main/java/org/apache/directory/shared/ldap/message/LdapProtocolEncoder.java
(original)
+++ directory/shared/branches/shared-codec-merge/ldap/src/main/java/org/apache/directory/shared/ldap/message/LdapProtocolEncoder.java
Wed Aug 18 16:07:18 2010
@@ -110,7 +110,7 @@ public class LdapProtocolEncoder extends
                 buffer.put( UniversalTag.SEQUENCE_TAG );
 
                 // The length has been calculated by the computeLength method
-                buffer.put( TLV.getBytes( message.getMessageLength() ) );
+                buffer.put( TLV.getBytes( ( ( AbstractMessage ) message ).getMessageLength()
) );
             }
             catch ( BufferOverflowException boe )
             {
@@ -130,7 +130,7 @@ public class LdapProtocolEncoder extends
             {
                 // Encode the controls
                 buffer.put( ( byte ) LdapConstants.CONTROLS_TAG );
-                buffer.put( TLV.getBytes( message.getControlsLength() ) );
+                buffer.put( TLV.getBytes( ( ( AbstractMessage ) message ).getControlsLength()
) );
 
                 // Encode each control
                 for ( Control control : controls.values() )
@@ -209,14 +209,14 @@ public class LdapProtocolEncoder extends
 
             // Computes the controls length
             // 1 + Length.getNbBytes( controlsSequenceLength ) + controlsSequenceLength;
-            message.setControlsLength( controlsSequenceLength );
+            ( ( AbstractMessage ) message ).setControlsLength( controlsSequenceLength );
 
             // Now, add the tag and the length of the controls length
             ldapMessageLength += 1 + TLV.getNbBytes( controlsSequenceLength ) + controlsSequenceLength;
         }
 
         // Store the messageLength
-        message.setMessageLength( ldapMessageLength );
+        ( ( AbstractMessage ) message ).setMessageLength( ldapMessageLength );
 
         // finally, calculate the global message size :
         // length(Tag) + Length(length) + length

Modified: directory/shared/branches/shared-codec-merge/ldap/src/main/java/org/apache/directory/shared/ldap/message/Message.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-codec-merge/ldap/src/main/java/org/apache/directory/shared/ldap/message/Message.java?rev=986765&r1=986764&r2=986765&view=diff
==============================================================================
--- directory/shared/branches/shared-codec-merge/ldap/src/main/java/org/apache/directory/shared/ldap/message/Message.java
(original)
+++ directory/shared/branches/shared-codec-merge/ldap/src/main/java/org/apache/directory/shared/ldap/message/Message.java
Wed Aug 18 16:07:18 2010
@@ -81,32 +81,6 @@ public interface Message
 
 
     /**
-     * Stores the encoded length for the controls
-     * @param controlsLength The encoded length
-     */
-    void setControlsLength( int controlsLength );
-
-
-    /**
-     * @return The encoded Controls' length
-     */
-    int getControlsLength();
-
-
-    /**
-     * Stores the encoded length for the message
-     * @param messageLength The encoded length
-     */
-    void setMessageLength( int messageLength );
-
-
-    /**
-     * @return The encoded Message's length
-     */
-    int getMessageLength();
-
-
-    /**
      * Adds a control to this Message.
      * 
      * @param control the control to add.



Mime
View raw message