From b126c6c5f625432722405538692184f5c74edaad Mon Sep 17 00:00:00 2001 From: Instrumental Date: Thu, 29 Mar 2018 21:40:16 -0500 Subject: Clean up Sonar results 3 Issue-ID: AAF-206 Change-Id: I4494990e8e0bd702b475bbbfb140eaadd566d2a0 Signed-off-by: Instrumental --- .../src/main/java/org/onap/aaf/cadi/client/AbsAuthentication.java | 2 +- cadi/client/src/main/java/org/onap/aaf/cadi/http/HRcli.java | 2 +- .../src/main/java/org/onap/aaf/cadi/locator/PropertyLocator.java | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'cadi/client/src') diff --git a/cadi/client/src/main/java/org/onap/aaf/cadi/client/AbsAuthentication.java b/cadi/client/src/main/java/org/onap/aaf/cadi/client/AbsAuthentication.java index 7a32473c..80e6dc40 100644 --- a/cadi/client/src/main/java/org/onap/aaf/cadi/client/AbsAuthentication.java +++ b/cadi/client/src/main/java/org/onap/aaf/cadi/client/AbsAuthentication.java @@ -51,7 +51,7 @@ public abstract class AbsAuthentication implements SecuritySetter securityInfo; diff --git a/cadi/client/src/main/java/org/onap/aaf/cadi/http/HRcli.java b/cadi/client/src/main/java/org/onap/aaf/cadi/http/HRcli.java index f289b0e3..908b895b 100644 --- a/cadi/client/src/main/java/org/onap/aaf/cadi/http/HRcli.java +++ b/cadi/client/src/main/java/org/onap/aaf/cadi/http/HRcli.java @@ -58,7 +58,7 @@ public class HRcli extends Rcli { } public HRcli(HMangr hman, URI uri, Item locItem, SecuritySetter secSet) { - locItem=item; + item=locItem; this.uri = uri; this.hman = hman; ss=secSet; diff --git a/cadi/client/src/main/java/org/onap/aaf/cadi/locator/PropertyLocator.java b/cadi/client/src/main/java/org/onap/aaf/cadi/locator/PropertyLocator.java index 5820bf29..9761937e 100644 --- a/cadi/client/src/main/java/org/onap/aaf/cadi/locator/PropertyLocator.java +++ b/cadi/client/src/main/java/org/onap/aaf/cadi/locator/PropertyLocator.java @@ -49,7 +49,7 @@ public class PropertyLocator implements Locator { private long backgroundRefresh; public PropertyLocator(String locList) throws LocatorException { - this(locList,10000L, 1000*60*20); // defaults, do not refresh more than once in 10 seconds, Refresh Locator every 20 mins. + this(locList,10000L, 1000*60*20L); // defaults, do not refresh more than once in 10 seconds, Refresh Locator every 20 mins. } /** * comma delimited root url list @@ -168,7 +168,8 @@ public class PropertyLocator implements Locator { case 1: return current[0]; default: - return current[Math.abs(random.nextInt())%current.length]; + int rand = random.nextInt(); // sonar driven syntax + return current[Math.abs(rand)%current.length]; } } -- cgit 1.2.3-korg