chia7712 commented on code in PR #24288:
URL: https://github.com/apache/kafka/pull/24288#discussion_r4604601052


##########
coordinator-common/src/testFixtures/java/org/apache/kafka/coordinator/common/runtime/MockCoordinatorExecutor.java:
##########
@@ -41,11 +41,15 @@ private class ExecutorTask<R> {
         }
 
         CoordinatorResult<Void, T> execute() {
+            // As in CoordinatorExecutorImpl, only an exception thrown by the 
task is passed to the
+            // operation. An exception thrown by the operation is thrown by 
poll().
+            R result;

Review Comment:
   Another style is shown below
   ```java
   R result = null;
   Throwable exception = null;
   try {
       result = task.run();
   } catch (Throwable ex) {
       exception = ex;
   }
   return operation.onComplete(result, exception);
   ```
   Both are fine with me. Just FYI



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

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to