jolshan commented on code in PR #16443:
URL: https://github.com/apache/kafka/pull/16443#discussion_r1779285874
##########
metadata/src/main/java/org/apache/kafka/controller/QuorumController.java:
##########
@@ -2314,11 +2315,24 @@ public CompletableFuture<UpdateFeaturesResponseData>
updateFeatures(
}).thenApply(result -> {
UpdateFeaturesResponseData responseData = new
UpdateFeaturesResponseData();
responseData.setResults(new
UpdateFeaturesResponseData.UpdatableFeatureResultCollection(result.size()));
- result.forEach((featureName, error) -> responseData.results().add(
- new UpdateFeaturesResponseData.UpdatableFeatureResult()
- .setFeature(featureName)
- .setErrorCode(error.error().code())
- .setErrorMessage(error.message())));
+ Optional<Entry<String, ApiError>> errorEntry =
result.entrySet().stream().filter(entry ->
Review Comment:
It doesn't hurt anything, but I can move it to the else if path
--
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]