From: Arindam Mondal Date: Tue, 30 Apr 2019 06:04:26 +0000 (+0900) Subject: Sonar fix NullPointerException X-Git-Tag: 1.5.2~377^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F91%2F86591%2F1;p=so.git Sonar fix NullPointerException Issue-ID: SO-1829 Change-Id: I2b09733698391607989c2289b8c9f8ba5cdfabe4 Signed-off-by: arind.mondal --- 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 cce476f4d8..9f8a456002 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 @@ -140,7 +140,9 @@ public class PnfEventReadyDmaapClient implements DmaapClient { registerClientResponse(idList.get(0), EntityUtils.toString(response.getEntity(), "UTF-8")); } - idList.forEach(this::informAboutPnfReadyIfPnfCorrelationIdFound); + if (idList != null) { + idList.forEach(this::informAboutPnfReadyIfPnfCorrelationIdFound); + } } catch (IOException e) { logger.error("Exception caught during sending rest request to dmaap for listening event topic", e); } finally {