summaryrefslogtreecommitdiffstats
path: root/cadi/client/src
diff options
context:
space:
mode:
authorInstrumental <jcgmisc@stl.gathman.org>2018-03-29 21:40:16 -0500
committerInstrumental <jcgmisc@stl.gathman.org>2018-03-29 21:40:24 -0500
commitb126c6c5f625432722405538692184f5c74edaad (patch)
treedcbc3a52cb13064356fa650c56fe9c90c475f6ff /cadi/client/src
parent36b62be84b398044e1feae657c662dba6247782f (diff)
Clean up Sonar results 3
Issue-ID: AAF-206 Change-Id: I4494990e8e0bd702b475bbbfb140eaadd566d2a0 Signed-off-by: Instrumental <jcgmisc@stl.gathman.org>
Diffstat (limited to 'cadi/client/src')
-rw-r--r--cadi/client/src/main/java/org/onap/aaf/cadi/client/AbsAuthentication.java2
-rw-r--r--cadi/client/src/main/java/org/onap/aaf/cadi/http/HRcli.java2
-rw-r--r--cadi/client/src/main/java/org/onap/aaf/cadi/locator/PropertyLocator.java5
3 files changed, 5 insertions, 4 deletions
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<CLIENT> implements SecuritySetter<CLIENT
protected static final String REPEAT_OFFENDER = "This call is aborted because of repeated usage of invalid Passwords";
private static final int MAX_TEMP_COUNT = 10;
private static final int MAX_SPAM_COUNT = 10000;
- private static final long WAIT_TIME = 1000*60*4;
+ private static final long WAIT_TIME = 1000*60*4L;
private final byte[] headValue;
private String user;
protected final SecurityInfoC<CLIENT> 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<HttpURLConnection> {
}
public HRcli(HMangr hman, URI uri, Item locItem, SecuritySetter<HttpURLConnection> 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<URI> {
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<URI> {
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];
}
}