xyuanlu commented on code in PR #2035:
URL: https://github.com/apache/helix/pull/2035#discussion_r850828303


##########
helix-rest/src/main/java/org/apache/helix/rest/clusterMaintenanceService/MaintenanceManagementInstanceInfo.java:
##########
@@ -84,11 +85,12 @@ public void mergeResult(MaintenanceManagementInstanceInfo 
info) {
   }
 
   public void mergeResult(MaintenanceManagementInstanceInfo info, boolean 
nonBlockingFailure) {
-    messages.addAll(info.getMessages());
-    status =
-        (info.isSuccessful() || nonBlockingFailure) && isSuccessful() ? 
OperationalStatus.SUCCESS
-            : OperationalStatus.FAILURE;
-    if (info.hasOperationResult()) {
+    if (info != null) {

Review Comment:
   Good point. Updated. 
   I think if we get null `info`, we could keep status the same..? 
   



##########
helix-rest/src/main/java/org/apache/helix/rest/clusterMaintenanceService/MaintenanceManagementInstanceInfo.java:
##########
@@ -84,11 +85,12 @@ public void mergeResult(MaintenanceManagementInstanceInfo 
info) {
   }
 
   public void mergeResult(MaintenanceManagementInstanceInfo info, boolean 
nonBlockingFailure) {
-    messages.addAll(info.getMessages());
-    status =
-        (info.isSuccessful() || nonBlockingFailure) && isSuccessful() ? 
OperationalStatus.SUCCESS
-            : OperationalStatus.FAILURE;
-    if (info.hasOperationResult()) {
+    if (info != null) {
+      messages.addAll(info.getMessages());
+    }
+    status = ((info == null || info.isSuccessful() || nonBlockingFailure) && 
isSuccessful())

Review Comment:
   TFTR. Updated.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to