MINOR: Catch InvocationTargetException explicitly and propagate underlying cause
InvocationTargetException always wraps an underlying cause. It makes sense to catch it as soon as possible and only propagate the underlying cause.
Change
- Replace "legacy" [1] with
getCause() - Propagate the cause after catching InvocationTargetException
[1] "legacy as per the docs" https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/InvocationTargetException.html
@dengziming @showuon please review this small change.
@mimaison kindly review when you get a chance.
@showuon requesting for your code review time on this one. We already have two approvals from non-committers.
The failing tests for JDK 11 are unrelated to the code changes.
Build / JDK 11 and Scala 2.13 / testLargeAssignmentAndGroupWithNonEqualSubscription() – org.apache.kafka.clients.consumer.StickyAssignorTest
1m 3s
Build / JDK 11 and Scala 2.13 / testPrepareJoinAndRejoinAfterFailedRebalance() – org.apache.kafka.clients.consumer.internals.EagerConsumerCoordinatorTest
<1s
Build / JDK 11 and Scala 2.13 / testTimeouts() – org.apache.kafka.controller.QuorumControllerTest
@ijuma @mimaison requesting your your time to review this. Please note that we have this triaged with two non-committers already.