From 198dcad3901704a0b68a545e4cc7dbc4b5343413 Mon Sep 17 00:00:00 2001 From: "r.bogacki" Date: Mon, 8 Apr 2019 11:07:57 +0200 Subject: Fixed recent Sonar blocker issues Fixed blockers according to Sonar analysis. Change-Id: Ib068b586cd72c1634780220ac5498e1962dee434 Issue-ID: SO-1734 Signed-off-by: Robert Bogacki --- .../onap/so/client/cds/AbstractCDSProcessingBBUtils.java | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'bpmn/MSOCommonBPMN/src/main/java/org/onap') diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/AbstractCDSProcessingBBUtils.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/AbstractCDSProcessingBBUtils.java index 750b7ace35..083a6b6e1f 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/AbstractCDSProcessingBBUtils.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/cds/AbstractCDSProcessingBBUtils.java @@ -130,19 +130,12 @@ public class AbstractCDSProcessingBBUtils implements CDSProcessingListener { ExecutionServiceInput executionServiceInput = (ExecutionServiceInput) execution .getVariable("executionServiceInput"); - //CDSProcessingListener cdsProcessingListener = new AbstractCDSProcessingBBUtils(); - - CDSProcessingClient cdsClient = null; - CountDownLatch countDownLatch; - try { - cdsClient = new CDSProcessingClient(this); - countDownLatch = cdsClient.sendRequest(executionServiceInput); + try(CDSProcessingClient cdsClient = new CDSProcessingClient(this)) { + CountDownLatch countDownLatch = cdsClient.sendRequest(executionServiceInput); countDownLatch.await(props.getTimeout(), TimeUnit.SECONDS); - } catch (InterruptedException ex) { + } catch (InterruptedException ex){ logger.error("Caught exception in sendRequestToCDSClient in AbstractCDSProcessingBBUtils : ", ex); Thread.currentThread().interrupt(); - } finally { - cdsClient.close(); } if (cdsResponse != null) { -- cgit 1.2.3-korg