RivenSun2 opened a new pull request #11819:
URL: https://github.com/apache/kafka/pull/11819


   You can see their `toString` method in all xxx.java in 
`clients/src/generated/java` directory.
   For fields of type String, the `toString()` method is still called, which 
brings an unnecessary method call.
   example:
   AddOffsetsToTxnRequestData#toString()
   `@Override
   public String toString() {
       return "AddOffsetsToTxnRequestData("
           + "transactionalId=" + ((transactionalId == null) ? "null" : "'" + 
transactionalId.toString() + "'")
           + ", producerId=" + producerId
           + ", producerEpoch=" + producerEpoch
           + ", groupId=" + ((groupId == null) ? "null" : "'" + 
groupId.toString() + "'")
           + ")";
   } `
   
   In fact, `transactionalId` and `groupId` are already String types.


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

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to