kirktrue commented on code in PR #14640:
URL: https://github.com/apache/kafka/pull/14640#discussion_r1423128358


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerUtils.java:
##########
@@ -224,4 +224,21 @@ else if (t instanceof KafkaException)
             throw new TimeoutException(e);
         }
     }
+
+    public static <T> T getResult(Future<T> future) {
+        try {
+            return future.get();
+        } catch (ExecutionException e) {
+            Throwable t = e.getCause();
+
+            if (t instanceof WakeupException)

Review Comment:
   Yeah, old crufty code. I made a 'maybe wrap' utility method and cleaned up 
the error handling.



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