summaryrefslogtreecommitdiffstats
path: root/auth/auth-batch/src/main
diff options
context:
space:
mode:
authorInstrumental <jcgmisc@stl.gathman.org>2018-03-29 19:02:24 -0500
committerInstrumental <jcgmisc@stl.gathman.org>2018-03-29 19:02:44 -0500
commitd86dd644e1543743cfcbc83b230bd4f2cb2e5d4e (patch)
tree698e12f7c0142441cd494cd68da03437e510d0b0 /auth/auth-batch/src/main
parent17ca744723bd652f15d59d6c8555824f6e49018d (diff)
Clean up Sonar results 1
Issue-ID: AAF-206 Change-Id: If1fced5b528490a52691508fb1e30962dbe28856 Signed-off-by: Instrumental <jcgmisc@stl.gathman.org>
Diffstat (limited to 'auth/auth-batch/src/main')
-rw-r--r--auth/auth-batch/src/main/java/org/onap/aaf/auth/Batch.java12
-rw-r--r--auth/auth-batch/src/main/java/org/onap/aaf/auth/actions/Email.java1
2 files changed, 9 insertions, 4 deletions
diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/Batch.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/Batch.java
index 6d9252e2..ad2de10f 100644
--- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/Batch.java
+++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/Batch.java
@@ -369,11 +369,15 @@ public abstract class Batch {
return ld;
}
protected int count(String str, char c) {
- int count=str==null||str.isEmpty()?0:1;
- for(int i=str.indexOf(c);i>=0;i=str.indexOf(c,i+1)) {
- ++count;
+ if(str==null || str.isEmpty()) {
+ return 0;
+ } else {
+ int count=1;
+ for(int i=str.indexOf(c);i>=0;i=str.indexOf(c,i+1)) {
+ ++count;
+ }
+ return count;
}
- return count;
}
public final void close(AuthzTrans trans) {
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 346e517f..0687364b 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,6 +167,7 @@ public class Email implements Action<Organization,Void, String>{
try {
Thread.sleep(wait);
} catch (InterruptedException e) {
+ return exec(trans,org,sb);
}
}
return exec(trans,org,sb);