ijuma commented on code in PR #18371:
URL: https://github.com/apache/kafka/pull/18371#discussion_r1904766270
##########
metadata/src/main/java/org/apache/kafka/metadata/storage/Formatter.java:
##########
@@ -459,17 +459,12 @@ enum DirectoryType {
DYNAMIC_METADATA_VOTER_DIRECTORY;
String description() {
- switch (this) {
- case LOG_DIRECTORY:
- return "data directory";
- case STATIC_METADATA_DIRECTORY:
- return "metadata directory";
- case DYNAMIC_METADATA_NON_VOTER_DIRECTORY:
- return "dynamic metadata directory";
- case DYNAMIC_METADATA_VOTER_DIRECTORY:
- return "dynamic metadata voter directory";
- }
- throw new RuntimeException("invalid enum type " + this);
Review Comment:
Right - I'll confirm, but IntelliJ does this if its static analyzer decides
the code is unreachable due to an exhaustive switch.
--
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]