eolivelli commented on pull request #10215:
URL: https://github.com/apache/pulsar/pull/10215#issuecomment-820970570


   I have another idea (that I am testing locally)
   
   We can simply "clone" the CommandGetSchemaResponse inside 
`handleGetSchemaResponse`, this way we decode the ByteBuf and we return a safe 
object to the caller
   
   ```
    @Override
       protected void handleGetSchemaResponse(CommandGetSchemaResponse 
commandGetSchemaResponse) {
           log.info("handleGetSchemaResponse {}", commandGetSchemaResponse);
           checkArgument(state == State.Ready);
           CommandGetSchemaResponse clone = new CommandGetSchemaResponse();
           clone.copyFrom(commandGetSchemaResponse);
           commandGetSchemaResponse = clone;
   ```


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


Reply via email to