jingjia88 opened a new pull request, #19868:
URL: https://github.com/apache/kafka/pull/19868

   This refactor improves the implementation of `awaitNonEmptyRecords` by:
   
   - Removing the unreachable `throw new IllegalStateException` statement, 
which was dead code due to `pollRecordsUntilTrue` throwing exceptions on 
timeout.
   - Eliminating the use of `return` inside the lambda, which relies on 
non-local returns that can be confusing and error-prone in Scala.
   
   This change does not affect functionality but enhances code readability and 
robustness.
   


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