From 24c6b1682bb59691f8d5e631b1074355b7d82a54 Mon Sep 17 00:00:00 2001 From: "Tej, Tarun" Date: Thu, 7 Sep 2017 19:21:28 -0400 Subject: Sonar Fixes Fixes to the sonar issues along with some cleanup code to remove warnings. Issue-Id: POLICY-113 Change-Id: I826562f7509c346210ac865cc6b31bce26bee2cf Signed-off-by: Tej, Tarun --- BRMSGateway/src/main/java/org/onap/policy/brmsInterface/BRMSPush.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'BRMSGateway') diff --git a/BRMSGateway/src/main/java/org/onap/policy/brmsInterface/BRMSPush.java b/BRMSGateway/src/main/java/org/onap/policy/brmsInterface/BRMSPush.java index f6f7c1214..b09a3d8c8 100644 --- a/BRMSGateway/src/main/java/org/onap/policy/brmsInterface/BRMSPush.java +++ b/BRMSGateway/src/main/java/org/onap/policy/brmsInterface/BRMSPush.java @@ -626,6 +626,9 @@ public class BRMSPush { // Additional Check due to Limitations from Nexus API to check if the artifact is the latest. private NexusArtifact additionalNexusLatestCheck(String selectedName, NexusArtifact result) { + if(result==null){ + return result; + } String nextVersion = incrementVersion(result.getVersion()); List artifact = getArtifactFromNexus(selectedName, nextVersion); return artifact.isEmpty() ? result : additionalNexusLatestCheck(selectedName, artifact.get(0)); -- cgit 1.2.3-korg