[
https://issues.apache.org/jira/browse/KAFKA-19676?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chia-Ping Tsai resolved KAFKA-19676.
------------------------------------
Fix Version/s: 4.2.0
Resolution: Fixed
> EpochState should override close to avoid throwing IOException
> --------------------------------------------------------------
>
> Key: KAFKA-19676
> URL: https://issues.apache.org/jira/browse/KAFKA-19676
> Project: Kafka
> Issue Type: Improvement
> Reporter: Chia-Ping Tsai
> Assignee: Jimmy Wang
> Priority: Minor
> Fix For: 4.2.0
>
>
> All subclasses of EpochState do not throw an IOException when closing, so
> catching it is unnecessary. We could override close to remove the IOException
> declaration and streamline the code
> {code:java}
> if (state != null) {
> try {
> state.close();
> } catch (IOException e) {
> throw new UncheckedIOException(
> "Failed to transition from " + state.name() + " to " +
> newState.name(), e);
> }
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)