diff options
author | saul.gill <saul.gill@est.tech> | 2023-02-17 16:18:10 +0000 |
---|---|---|
committer | saul.gill <saul.gill@est.tech> | 2023-02-17 16:18:13 +0000 |
commit | 22fbb432c8d68b407ecd2f8c978218f47623135e (patch) | |
tree | 3a1590821fcaaeddc3875e65f68f799e492a4441 /participant/participant-impl | |
parent | 2fad72c36bfba0c1215a9616d53f7e6f2bd9a4bf (diff) |
Fix sonar security hotspot
Fixed issue with InterruptedException
Issue-ID: POLICY-4562
Change-Id: I44f43a5f48091dc5c608009e286773264db33c04
Signed-off-by: saul.gill <saul.gill@est.tech>
Diffstat (limited to 'participant/participant-impl')
-rw-r--r-- | participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/acm/participant/kubernetes/handler/AutomationCompositionElementHandler.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/acm/participant/kubernetes/handler/AutomationCompositionElementHandler.java b/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/acm/participant/kubernetes/handler/AutomationCompositionElementHandler.java index 3233cdc06..b681ba91d 100644 --- a/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/acm/participant/kubernetes/handler/AutomationCompositionElementHandler.java +++ b/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/acm/participant/kubernetes/handler/AutomationCompositionElementHandler.java @@ -29,9 +29,11 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import javax.ws.rs.core.Response; import lombok.AccessLevel; import lombok.Getter; import lombok.Setter; +import net.bytebuddy.implementation.bytecode.Throw; import org.onap.policy.clamp.acm.participant.intermediary.api.AutomationCompositionElementListener; import org.onap.policy.clamp.acm.participant.intermediary.api.ParticipantIntermediaryApi; import org.onap.policy.clamp.acm.participant.kubernetes.exception.ServiceException; @@ -126,8 +128,13 @@ public class AutomationCompositionElementHandler implements AutomationCompositio checkPodStatus(automationCompositionId, element.getId(), chartInfo, config.uninitializedToPassiveTimeout, config.podStatusCheckInterval); } - } catch (ServiceException | CoderException | IOException | ExecutionException | InterruptedException e) { + } catch (ServiceException | CoderException | IOException e) { LOGGER.warn("Installation of Helm chart failed", e); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new PfModelException(Response.Status.BAD_REQUEST, "Error invoking ExecutorService ", e); + } catch (ExecutionException e) { + throw new PfModelException(Response.Status.BAD_REQUEST, "Error retrieving pod status result ", e); } } |