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

 ##########
 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:
   `retainedSlices()` was not used originally because it was introduced in 
netty-4.1 while the original patch was based on netty-4.0. 

----------------------------------------------------------------
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