Chia-Ping Tsai created KAFKA-19676:
--------------------------------------
Summary: 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: Chia-Ping Tsai
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)