From a4bdcb48203015685c1cda87e94a3e9e0aa54e01 Mon Sep 17 00:00:00 2001 From: Thugutla sailakshmi Date: Wed, 11 Sep 2019 11:44:10 +0530 Subject: 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 --- .../java/org/onap/aaf/auth/batch/helpers/CQLBatchLoop.java | 12 ++++++------ 1 file 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; -- cgit 1.2.3-korg