cmccabe commented on code in PR #14306: URL: https://github.com/apache/kafka/pull/14306#discussion_r1312381991
########## metadata/src/main/java/org/apache/kafka/controller/FeatureControlManager.java: ########## @@ -234,9 +247,64 @@ private ApiError updateFeature( } } + private Optional<String> reasonNotSupported( + String featureName, + short newVersion + ) { + int numBrokersChecked = 0; + int numControllersChecked = 0; + Optional<String> reason = quorumFeatures.reasonNotLocallySupported(featureName, newVersion); + if (reason.isPresent()) return reason; Review Comment: ehhh... we normally do allow them. ``` % git grep -w return | grep -w if | wc -l 1470``` I think the rule is that you need braces for any `if` statement that spans multiple lines. Also if it gets (horizontally) long, you should cut that out. We should probably teach checkstyle about this at some point, or at least write it down ########## metadata/src/main/java/org/apache/kafka/controller/FeatureControlManager.java: ########## @@ -234,9 +247,64 @@ private ApiError updateFeature( } } + private Optional<String> reasonNotSupported( + String featureName, + short newVersion + ) { + int numBrokersChecked = 0; + int numControllersChecked = 0; + Optional<String> reason = quorumFeatures.reasonNotLocallySupported(featureName, newVersion); + if (reason.isPresent()) return reason; Review Comment: ehhh... we normally do allow them. ``` % git grep -w return | grep -w if | wc -l 1470 ``` I think the rule is that you need braces for any `if` statement that spans multiple lines. Also if it gets (horizontally) long, you should cut that out. We should probably teach checkstyle about this at some point, or at least write it down -- 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