diff options
author | k.kazak <k.kazak@samsung.com> | 2019-05-02 11:58:21 +0200 |
---|---|---|
committer | Katsia Kazak <k.kazak@samsung.com> | 2019-05-07 10:34:05 +0000 |
commit | 95ff3e1578b1ea0307313d4091f6881b3d05cb59 (patch) | |
tree | b32558a7f7e0c4d5d9ae0652ba4484c362a35e04 /bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap | |
parent | 7af16eec7a5ea196de57b47b918d3d88390a715c (diff) |
fix newest sonar bugs
OperationProgressor: restore interrupted state
PnfEventReadyDmaapClient: remove useless check for null that never happens
Test for this case already exists in
PnfEventReadyDmaapClientTest.pnfCorrelationIdIsNotFoundInHttpResponse
Change-Id: Ic7e4d0cb701721ee4d9a8bc46d65dc1d847d7704
Issue-ID: SO-1811
Signed-off-by: k.kazak <k.kazak@samsung.com>
Diffstat (limited to 'bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap')
-rw-r--r-- | bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java index 9f8a456002..357b571a5c 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java +++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java @@ -135,7 +135,8 @@ public class PnfEventReadyDmaapClient implements DmaapClient { HttpResponse response = httpClient.execute(getRequest); List<String> idList = getPnfCorrelationIdListFromResponse(response); - if (idList != null && idList.size() > 0) { + // idList is never null + if (!idList.isEmpty()) { // send only body of response registerClientResponse(idList.get(0), EntityUtils.toString(response.getEntity(), "UTF-8")); } |