diff options
Diffstat (limited to 'auth/auth-batch/src')
-rw-r--r-- | auth/auth-batch/src/main/java/org/onap/aaf/auth/Batch.java | 12 | ||||
-rw-r--r-- | auth/auth-batch/src/main/java/org/onap/aaf/auth/actions/Email.java | 1 |
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); |