mxm commented on code in PR #724:
URL: 
https://github.com/apache/flink-kubernetes-operator/pull/724#discussion_r1418965408


##########
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:
   The order in the enum matters? We should add a comment to indicate that. 



-- 
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]

Reply via email to