diff options
author | Instrumental <jcgmisc@stl.gathman.org> | 2018-03-29 21:40:16 -0500 |
---|---|---|
committer | Instrumental <jcgmisc@stl.gathman.org> | 2018-03-29 21:40:24 -0500 |
commit | b126c6c5f625432722405538692184f5c74edaad (patch) | |
tree | dcbc3a52cb13064356fa650c56fe9c90c475f6ff /auth/auth-batch/src/main | |
parent | 36b62be84b398044e1feae657c662dba6247782f (diff) |
Clean up Sonar results 3
Issue-ID: AAF-206
Change-Id: I4494990e8e0bd702b475bbbfb140eaadd566d2a0
Signed-off-by: Instrumental <jcgmisc@stl.gathman.org>
Diffstat (limited to 'auth/auth-batch/src/main')
3 files changed, 6 insertions, 2 deletions
diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/actions/Email.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/actions/Email.java index 0687364b..25e2ffca 100644 --- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/actions/Email.java +++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/actions/Email.java @@ -167,7 +167,7 @@ public class Email implements Action<Organization,Void, String>{ try { Thread.sleep(wait); } catch (InterruptedException e) { - return exec(trans,org,sb); + Thread.currentThread().interrupt(); } } return exec(trans,org,sb); diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/helpers/Cred.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/helpers/Cred.java index 58af03b5..1131aca7 100644 --- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/helpers/Cred.java +++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/helpers/Cred.java @@ -264,7 +264,7 @@ public class Cred { } public long authCount(int idx) { - return basic_auth[idx]+basic_auth_256[idx]; + return (long)basic_auth[idx]+basic_auth_256[idx]; } public long x509Count(int idx) { diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/helpers/InputIterator.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/helpers/InputIterator.java index cb0bfa6a..0afcac27 100644 --- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/helpers/InputIterator.java +++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/helpers/InputIterator.java @@ -25,6 +25,7 @@ import java.io.BufferedReader; import java.io.IOException; import java.io.PrintStream; import java.util.Iterator; +import java.util.NoSuchElementException; public class InputIterator implements Iterable<String> { private BufferedReader in; @@ -57,6 +58,9 @@ public class InputIterator implements Iterable<String> { @Override public String next() { + if(!hasNext()) { + throw new NoSuchElementException(); + } return input; } |