athanatos commented on a change in pull request #940: BookieProtoEncoding: 
remove unnecessary slice() call
URL: https://github.com/apache/bookkeeper/pull/940#discussion_r159721568
 
 

 ##########
 File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieProtoEncoding.java
 ##########
 @@ -289,8 +289,8 @@ public Object decode(ByteBuf buffer)
                 entryId = buffer.readLong();
 
                 if (rc == BookieProtocol.EOK) {
-                    ByteBuf content = buffer.slice();
-                    return new BookieProtocol.ReadResponse(version, rc, 
ledgerId, entryId, content.retain());
+                    return new BookieProtocol.ReadResponse(version, rc,
 
 Review comment:
   Alright, I'll switch it to retainedSlice()

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to