You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kw...@apache.org on 2015/10/05 17:37:40 UTC

svn commit: r1706856 - /qpid/java/trunk/common/src/main/java/org/apache/qpid/bytebuffer/QpidByteBuffer.java

Author: kwall
Date: Mon Oct  5 15:37:40 2015
New Revision: 1706856

URL: http://svn.apache.org/viewvc?rev=1706856&view=rev
Log:
QPID-6770: Ensure that the first buffer returned by QBB#allocateDirectCollection is always view

Modified:
    qpid/java/trunk/common/src/main/java/org/apache/qpid/bytebuffer/QpidByteBuffer.java

Modified: qpid/java/trunk/common/src/main/java/org/apache/qpid/bytebuffer/QpidByteBuffer.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/common/src/main/java/org/apache/qpid/bytebuffer/QpidByteBuffer.java?rev=1706856&r1=1706855&r2=1706856&view=diff
==============================================================================
--- qpid/java/trunk/common/src/main/java/org/apache/qpid/bytebuffer/QpidByteBuffer.java (original)
+++ qpid/java/trunk/common/src/main/java/org/apache/qpid/bytebuffer/QpidByteBuffer.java Mon Oct  5 15:37:40 2015
@@ -508,7 +508,7 @@ public final class QpidByteBuffer
             }
             while(remaining > buf.remaining())
             {
-                buffers.add(buf);
+                buffers.add(buf  == _cachedBuffer.get() ? buf.view(0, buf.remaining()) : buf);
                 remaining -= buf.remaining();
                 buf = allocateDirect(_pooledBufferSize);
             }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org