mxm commented on code in PR #724: URL: https://github.com/apache/flink-kubernetes-operator/pull/724#discussion_r1419016181
########## flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/reconciler/diff/DiffResult.java: ########## @@ -101,14 +101,7 @@ public String toString() { } private static DiffType getSpechChangeType(List<Diff<?>> diffs) { - var type = DiffType.IGNORE; - for (var diff : diffs) { - type = DiffType.max(type, diff.getType()); - if (type == DiffType.UPGRADE) { - return type; - } - } - return type; + return diffs.stream().map(Diff::getType).reduce(DiffType::max).orElse(DiffType.IGNORE); Review Comment: It is not the first time I'm seeing this. But just because something can be done, doesn't mean it is obvious to outsiders. -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org