sijie commented on a change in pull request #5123: Modify the schema decode 
method can decode ByteBuf
URL: https://github.com/apache/pulsar/pull/5123#discussion_r324246381
 
 

 ##########
 File path: 
pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/ByteBufferSchema.java
 ##########
 @@ -68,6 +77,22 @@ public ByteBuffer decode(byte[] data) {
         }
     }
 
+    @Override
+    public ByteBuffer decode(ByteBuf byteBuf) {
+        if (null == byteBuf) {
+            return null;
+        } else {
+            int size = byteBuf.readableBytes();
 
 Review comment:
   @congbobo184 I think this change still returns the underlying buffer. we 
need to copy the bytes from the ByteBuf.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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