Sonar fix NullPointerException 91/86591/1
authorArindam Mondal <arind.mondal@samsung.com>
Tue, 30 Apr 2019 06:04:26 +0000 (15:04 +0900)
committerarind.mondal <arind.mondal@samsung.com>
Tue, 30 Apr 2019 06:16:03 +0000 (15:16 +0900)
Issue-ID: SO-1829
Change-Id: I2b09733698391607989c2289b8c9f8ba5cdfabe4
Signed-off-by: arind.mondal <arind.mondal@samsung.com>
bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java

index cce476f..9f8a456 100644 (file)
@@ -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 {