Removed firstTime - I have no idea what it was supposed to do
Project: http://git-wip-us.apache.org/repos/asf/curator/repo Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/50550eec Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/50550eec Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/50550eec Branch: refs/heads/CURATOR-305 Commit: 50550eecf0ad6cc677f92abd48f1de5c8875e689 Parents: a5bab5f Author: randgalt <[email protected]> Authored: Wed Mar 2 14:35:01 2016 -0500 Committer: randgalt <[email protected]> Committed: Wed Mar 2 14:35:01 2016 -0500 ---------------------------------------------------------------------- .../curator/framework/imps/CuratorTransactionImpl.java | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/curator/blob/50550eec/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorTransactionImpl.java ---------------------------------------------------------------------- diff --git a/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorTransactionImpl.java b/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorTransactionImpl.java index 20ec274..424ecc6 100644 --- a/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorTransactionImpl.java +++ b/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorTransactionImpl.java @@ -32,8 +32,8 @@ import org.apache.zookeeper.data.Stat; import java.util.Collection; import java.util.List; import java.util.concurrent.Callable; -import java.util.concurrent.atomic.AtomicBoolean; +@SuppressWarnings("deprecation") class CuratorTransactionImpl implements CuratorTransaction, CuratorTransactionBridge, CuratorTransactionFinal { private final CuratorFrameworkImpl client; @@ -119,7 +119,6 @@ class CuratorTransactionImpl implements CuratorTransaction, CuratorTransactionBr Preconditions.checkState(!isCommitted, "transaction already committed"); isCommitted = true; - final AtomicBoolean firstTime = new AtomicBoolean(true); List<OpResult> resultList = RetryLoop.callWithRetry ( client.getZookeeperClient(), @@ -128,7 +127,7 @@ class CuratorTransactionImpl implements CuratorTransaction, CuratorTransactionBr @Override public List<OpResult> call() throws Exception { - return doOperation(firstTime); + return doOperation(); } } ); @@ -185,14 +184,8 @@ class CuratorTransactionImpl implements CuratorTransaction, CuratorTransactionBr return new CuratorTransactionResult(metadata.getType(), metadata.getForPath(), resultPath, resultStat); } - private List<OpResult> doOperation(AtomicBoolean firstTime) throws Exception + private List<OpResult> doOperation() throws Exception { - boolean localFirstTime = firstTime.getAndSet(false); - if ( !localFirstTime ) - { - // TODO - } - List<OpResult> opResults = client.getZooKeeper().multi(transaction); if ( opResults.size() > 0 ) {
