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


   For instance on Schema struct when you call "getName" the String is created 
and the ByteBuf is decoded:
   
   ```
   public String getName() {
                if (!hasName()) {
                        throw new IllegalStateException("Field 'name' is not 
set");
                }
                if (name == null) {
                        name = LightProtoCodec.readString(_parsedBuffer, 
_nameBufferIdx, _nameBufferLen);
                }
                return name;
        }
   ```
   
   with my approach you eagerly create the "String" for name and then the 
problem is fixed


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