fix: pmd issues.
@@ -55,8 +55,6 @@ public class UnpublishHandler extends BaseHandler implements StateChangeHandler
List<DeploymentConfig> deployments = openShiftService().getDeploymentsByLabel(labels);
List<DeploymentConfig> undeploying = deployments.stream().filter(d -> d.getSpec().getReplicas() == 0).collect(Collectors.toList());
- List<DeploymentConfig> deployed = deployments.stream().filter(d -> d.getStatus().getAvailableReplicas() != 0).collect(Collectors.toList());
-
if (!undeploying.isEmpty()) {
try {
openShiftService().scale(integrationDeployment.getSpec().getName(), labels, 0, 1, TimeUnit.MINUTES);
@@ -66,6 +64,7 @@ public class UnpublishHandler extends BaseHandler implements StateChangeHandler
}
}
+ List<DeploymentConfig> deployed = deployments.stream().filter(d -> d.getStatus().getAvailableReplicas() != 0).collect(Collectors.toList());
if(deployed.isEmpty()){
currentState = IntegrationDeploymentState.Unpublished;
}
