summaryrefslogtreecommitdiffstats
path: root/auth/auth-batch/src/main/java/org
diff options
context:
space:
mode:
authorThugutla sailakshmi <tsaila10@in.ibm.com>2019-09-11 11:44:10 +0530
committerThugutla sailakshmi <tsaila10@in.ibm.com>2019-09-11 11:45:06 +0530
commita4bdcb48203015685c1cda87e94a3e9e0aa54e01 (patch)
treef86a2d6dacd772ee57d4771dbeb2c2d0f054baa6 /auth/auth-batch/src/main/java/org
parent4fde06b24f52a3d3fccc84ef36c19831fc0bef8d (diff)
Merge this if statement with the enclosing one.
Merge this if statement with the enclosing one. Issue-ID: AAF-876 Change-Id: I45abf792e8d578f5f2faf7612619131a12c8716c Signed-off-by: Thugutla sailakshmi <tsaila10@in.ibm.com>
Diffstat (limited to 'auth/auth-batch/src/main/java/org')
-rw-r--r--auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/CQLBatchLoop.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/CQLBatchLoop.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/CQLBatchLoop.java
index 1a1bdf33..9cd7341c 100644
--- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/CQLBatchLoop.java
+++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/CQLBatchLoop.java
@@ -3,6 +3,7 @@
* org.onap.aaf
* ===========================================================================
* Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 IBM.
* ===========================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -51,15 +52,14 @@ public class CQLBatchLoop {
/**
* Assume this is another line in the Batch
* @return
- */
+ */
public StringBuilder inc() {
- if(i>=maxBatch || current.length()+sb.length()>MAX_CHARS) {
- if(i>0) {
- cqlBatch.execute(dryRun);
+ if((i>=maxBatch || current.length()+sb.length()>MAX_CHARS)&&(i>0)) {
+
+ cqlBatch.execute(dryRun);
i = -1;
incBatch();
- }
- }
+ }
if(i<0) {
cqlBatch.begin();
i=0;