curator-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cammcken...@apache.org
Subject [2/5] curator git commit: safer way to set outstanding
Date Wed, 01 Jun 2016 00:06:40 GMT
safer way to set outstanding


Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/c7f3b006
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/c7f3b006
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/c7f3b006

Branch: refs/heads/CURATOR-3.0
Commit: c7f3b006fc3fd0fde76dca4cf55d468245ecf335
Parents: f59f23c
Author: randgalt <randgalt@apache.org>
Authored: Thu May 26 17:18:17 2016 -0500
Committer: randgalt <randgalt@apache.org>
Committed: Thu May 26 17:18:17 2016 -0500

----------------------------------------------------------------------
 .../java/org/apache/curator/framework/imps/EnsembleTracker.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/c7f3b006/curator-framework/src/main/java/org/apache/curator/framework/imps/EnsembleTracker.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/main/java/org/apache/curator/framework/imps/EnsembleTracker.java
b/curator-framework/src/main/java/org/apache/curator/framework/imps/EnsembleTracker.java
index 0b93cab..2e020d4 100644
--- a/curator-framework/src/main/java/org/apache/curator/framework/imps/EnsembleTracker.java
+++ b/curator-framework/src/main/java/org/apache/curator/framework/imps/EnsembleTracker.java
@@ -149,11 +149,11 @@ public class EnsembleTracker implements Closeable, CuratorWatcher
             try
             {
                 client.getConfig().usingWatcher(this).inBackground(backgroundCallback).forEnsemble();
+                outstanding.incrementAndGet();  // finally block will decrement
             }
-            catch ( Exception e )
+            finally
             {
                 outstanding.decrementAndGet();
-                throw e;
             }
         }
     }


Mime
View raw message