improvement(deployment): Make deployment persistence more robust to missing data
@@ -16,6 +16,7 @@ import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.Objects;
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Function;
import java.util.stream.Collectors;
@@ -98,7 +99,7 @@ public class DeploymentStatusKeeper {
Topics deploymentDetails = (Topics) node;
DeploymentType deploymentType = Coerce.toEnum(DeploymentType.class, deploymentDetails
.find(DEPLOYMENT_TYPE_KEY_NAME));
- if (deploymentType.equals(type)) {
+ if (Objects.equals(deploymentType, type)) {
deployments.add(deploymentDetails);
}
});
