You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by jv...@apache.org on 2011/06/06 14:03:02 UTC

svn commit: r1132606 - /mina/branches/2.0.4/mina-core/src/main/java/org/apache/mina/core/buffer/AbstractIoBuffer.java

Author: jvermillard
Date: Mon Jun  6 12:03:02 2011
New Revision: 1132606

URL: http://svn.apache.org/viewvc?rev=1132606&view=rev
Log:
DIRMINA-836 fix : All the "indexed" putUnsignedXXX() methods disregard the index when writing to the underlying buffer. 


Modified:
    mina/branches/2.0.4/mina-core/src/main/java/org/apache/mina/core/buffer/AbstractIoBuffer.java

Modified: mina/branches/2.0.4/mina-core/src/main/java/org/apache/mina/core/buffer/AbstractIoBuffer.java
URL: http://svn.apache.org/viewvc/mina/branches/2.0.4/mina-core/src/main/java/org/apache/mina/core/buffer/AbstractIoBuffer.java?rev=1132606&r1=1132605&r2=1132606&view=diff
==============================================================================
--- mina/branches/2.0.4/mina-core/src/main/java/org/apache/mina/core/buffer/AbstractIoBuffer.java (original)
+++ mina/branches/2.0.4/mina-core/src/main/java/org/apache/mina/core/buffer/AbstractIoBuffer.java Mon Jun  6 12:03:02 2011
@@ -833,7 +833,7 @@ public abstract class AbstractIoBuffer e
     @Override
     public final IoBuffer putUnsignedInt(int index, byte value) {
         autoExpand(index, 4);
-        buf().putInt( (int)((short)value&0x00ff) );
+        buf().putInt( index, (int)((short)value&0x00ff) );
         return this;
     }
 
@@ -853,7 +853,7 @@ public abstract class AbstractIoBuffer e
     @Override
     public final IoBuffer putUnsignedInt(int index, short value) {
         autoExpand(index, 4);
-        buf().putInt( (int)((int)value&0x0000ffff) );
+        buf().putInt( index, (int)((int)value&0x0000ffff) );
         return this;
     }
 
@@ -873,7 +873,7 @@ public abstract class AbstractIoBuffer e
     @Override
     public final IoBuffer putUnsignedInt(int index, int value) {
         autoExpand(index, 4);
-        buf().putInt( value );
+        buf().putInt( index, value );
         return this;
     }
 
@@ -893,7 +893,7 @@ public abstract class AbstractIoBuffer e
     @Override
     public final IoBuffer putUnsignedInt(int index, long value) {
         autoExpand(index, 4);
-        buf().putInt( (int)(value&0x00000000ffffffffL) );
+        buf().putInt( index, (int)(value&0x00000000ffffffffL) );
         return this;
     }
 
@@ -913,7 +913,7 @@ public abstract class AbstractIoBuffer e
     @Override
     public final IoBuffer putUnsignedShort(int index, byte value) {
         autoExpand(index, 2);
-        buf().putShort( (short)((short)value&0x00ff) );
+        buf().putShort( index, (short)((short)value&0x00ff) );
         return this;
     }
 
@@ -933,7 +933,7 @@ public abstract class AbstractIoBuffer e
     @Override
     public final IoBuffer putUnsignedShort(int index, short value) {
         autoExpand(index, 2);
-        buf().putShort( value );
+        buf().putShort( index, value );
         return this;
     }
 
@@ -953,7 +953,7 @@ public abstract class AbstractIoBuffer e
     @Override
     public final IoBuffer putUnsignedShort(int index, int value) {
         autoExpand(index, 2);
-        buf().putShort( (short)value );
+        buf().putShort( index, (short)value );
         return this;
     }
 
@@ -973,7 +973,7 @@ public abstract class AbstractIoBuffer e
     @Override
     public final IoBuffer putUnsignedShort(int index, long value) {
         autoExpand(index, 2);
-        buf().putShort( (short)(value) );
+        buf().putShort( index, (short)(value) );
         return this;
     }