junkaixue commented on code in PR #2035:
URL: https://github.com/apache/helix/pull/2035#discussion_r849983346
##########
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:
All following logic relies on info != null. So why not just do:
if (info == null) {
return;
}
?
But before that, you need to move the status line before this. So status can
be updated independently.
--
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]