aboutsummaryrefslogtreecommitdiffstats
path: root/BRMSGateway
diff options
context:
space:
mode:
authorTej, Tarun <tt3868@att.com>2017-09-07 19:21:28 -0400
committerTej, Tarun <tt3868@att.com>2017-09-08 00:51:01 -0400
commit24c6b1682bb59691f8d5e631b1074355b7d82a54 (patch)
tree50a5db354050faf79ccc7e7e9a08e488163651aa /BRMSGateway
parent461b2b7eeca1586423349bc0c4c65f80f027292d (diff)
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 <tt3868@att.com>
Diffstat (limited to 'BRMSGateway')
-rw-r--r--BRMSGateway/src/main/java/org/onap/policy/brmsInterface/BRMSPush.java3
1 files changed, 3 insertions, 0 deletions
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<NexusArtifact> artifact = getArtifactFromNexus(selectedName, nextVersion);
return artifact.isEmpty() ? result : additionalNexusLatestCheck(selectedName, artifact.get(0));