mumrah commented on code in PR #12050: URL: https://github.com/apache/kafka/pull/12050#discussion_r870466324
########## server-common/src/main/java/org/apache/kafka/server/common/MetadataVersion.java: ########## @@ -273,6 +301,40 @@ public static MetadataVersion latest() { return VALUES[VALUES.length - 1]; } + public Optional<MetadataVersion> previous() { + int idx = this.ordinal(); Review Comment: Good catch! I think this was left over from when I had put UNINITIALIZED into VALUES. I opted against that since it would be a gotcha for future developers to encounter a version that was not really a version. -- 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