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/05/01 01:39:05 UTC

svn commit: r1332472 - /directory/shared/trunk/ldap/net/mina/src/main/java/org/apache/directory/shared/ldap/codec/protocol/mina/LdapProtocolDecoder.java

Author: elecharny
Date: Mon Apr 30 23:39:05 2012
New Revision: 1332472

URL: http://svn.apache.org/viewvc?rev=1332472&view=rev
Log:
Fix for DIRAPI-83. There is no need to position nor to reset the ByteBuffer.

Modified:
    directory/shared/trunk/ldap/net/mina/src/main/java/org/apache/directory/shared/ldap/codec/protocol/mina/LdapProtocolDecoder.java

Modified: directory/shared/trunk/ldap/net/mina/src/main/java/org/apache/directory/shared/ldap/codec/protocol/mina/LdapProtocolDecoder.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/net/mina/src/main/java/org/apache/directory/shared/ldap/codec/protocol/mina/LdapProtocolDecoder.java?rev=1332472&r1=1332471&r2=1332472&view=diff
==============================================================================
--- directory/shared/trunk/ldap/net/mina/src/main/java/org/apache/directory/shared/ldap/codec/protocol/mina/LdapProtocolDecoder.java (original)
+++ directory/shared/trunk/ldap/net/mina/src/main/java/org/apache/directory/shared/ldap/codec/protocol/mina/LdapProtocolDecoder.java Mon Apr 30 23:39:05 2012
@@ -131,8 +131,6 @@ public class LdapProtocolDecoder impleme
 
                     System.arraycopy( buffer.array(), position, array, 0, pduLength );
 
-                    buffer.position( size );
-
                     if ( array.length == 0 )
                     {
                         LOG.debug( "NULL buffer, what the HELL ???" );
@@ -141,8 +139,6 @@ public class LdapProtocolDecoder impleme
                     {
                         LOG.debug( Strings.dumpBytes( array ) );
                     }
-
-                    buffer.reset();
                 }
 
                 asn1Decoder.decode( buffer, messageContainer );