You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by gi...@git.apache.org on 2017/08/12 15:29:33 UTC

[GitHub] merlimat commented on issue #679: Refactored usages of deprecated classes

merlimat commented on issue #679: Refactored usages of deprecated classes
URL: https://github.com/apache/incubator-pulsar/pull/679#issuecomment-321988130
 
 
   > I still see a warning below. Are you going to fix this too on this PR?
   
   Fixing this is not straightforward. I think the best option is to get rid of `RecyclableSlicedByteBuf` and upgrade to Netty 4.1 which has something very similar to it. (I actually submitted a PR with the first version of it and then it got improved and merged there). 
   Anyway, we should use `buffer.retainedSlice()` and `buffer.retainedDuplicate()`
   https://netty.io/4.1/api/io/netty/buffer/ByteBuf.html#retainedSlice--
   
   > [WARNING] /Users/masakazu/git/pulsar/pulsar-common/src/main/java/io/netty/buffer/RecyclableSlicedByteBuf.java:[69,37] [deprecation] DuplicatedByteBuf in io.netty.buffer has been deprecated
   > Also, I'm curious why the class is under netty namespace. Is it because of accessibility (package-private)?
   
   Yes, the `RecyclableSlicedByteBuf` is kind of a "hack" to force recycling of duplicate buffers and needs to access internal Netty methods which are package protected.
 
----------------------------------------------------------------
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