dlg99 commented on a change in pull request #1141: Replace DoubleByteBuf with 
ByteBufList
URL: https://github.com/apache/bookkeeper/pull/1141#discussion_r168315873
 
 

 ##########
 File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/PerChannelBookieClient.java
 ##########
 @@ -560,8 +562,7 @@ void addEntry(final long ledgerId, byte[] masterKey, final 
long entryId, ByteBuf
                     .setOperation(OperationType.ADD_ENTRY)
                     .setTxnId(txnId);
 
-            byte[] toSendArray = new byte[toSend.readableBytes()];
-            toSend.getBytes(toSend.readerIndex(), toSendArray);
+            byte[] toSendArray = toSend.toArray();
 
 Review comment:
   ok, LGTM then.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to