You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2018/01/17 13:18:14 UTC

[GitHub] eolivelli commented on a change in pull request #996: DoubleByteBuf fix for Netty > 4.1.12

eolivelli commented on a change in pull request #996: DoubleByteBuf fix for Netty > 4.1.12
URL: https://github.com/apache/bookkeeper/pull/996#discussion_r162047103
 
 

 ##########
 File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/util/DoubleByteBuf.java
 ##########
 @@ -370,7 +371,10 @@ public ByteBuffer nioBuffer(int index, int length) {
 
     @Override
     public ByteBuffer[] nioBuffers(int index, int length) {
-        return new ByteBuffer[] { nioBuffer(index, length) };
+        if (b1.nioBufferCount() == 1 && b2.nioBufferCount() == 1) {
+            return new ByteBuffer[] { b1.nioBuffer(), b2.nioBuffer() };
+        }
+        return ObjectArrays.concat(b1.nioBuffers(), b2.nioBuffers(), ByteBuffer.class);
 
 Review comment:
   with this change we are no more observing index and length parameters
   @merlimat  @ivankelly  @sschepens 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services