You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@curator.apache.org by ra...@apache.org on 2017/07/11 13:57:20 UTC
[1/2] curator git commit: SharedCount: fix removeListener
Repository: curator
Updated Branches:
refs/heads/master 3b9d60626 -> 34be09a44
SharedCount: fix removeListener
`removeListener` only removed the listener from the SharedCount's `listeners` member, which had no effect.
This fix retrieves the `SharedValueListener` created for wrapping the `SharedCountListener` and removes it from the SharedValue's listeners.
Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/b1ffac91
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/b1ffac91
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/b1ffac91
Branch: refs/heads/master
Commit: b1ffac9145750e03c01c4ce6823f4a8536054a1e
Parents: 8b28b12
Author: Niv Singer <ni...@innerlogics.com>
Authored: Wed Jul 5 11:47:13 2017 +0300
Committer: GitHub <no...@github.com>
Committed: Wed Jul 5 11:47:13 2017 +0300
----------------------------------------------------------------------
.../apache/curator/framework/recipes/shared/SharedCount.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/curator/blob/b1ffac91/curator-recipes/src/main/java/org/apache/curator/framework/recipes/shared/SharedCount.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/shared/SharedCount.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/shared/SharedCount.java
index 87fffdd..50a9f0e 100644
--- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/shared/SharedCount.java
+++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/shared/SharedCount.java
@@ -141,7 +141,10 @@ public class SharedCount implements Closeable, SharedCountReader, Listenable<Sha
@Override
public void removeListener(SharedCountListener listener)
{
- listeners.remove(listener);
+ SharedValueListener valueListener = listeners.remove(listener);
+ if(valueListener != null) {
+ sharedValue.getListenable().removeListener(valueListener);
+ }
}
/**
[2/2] curator git commit: Merge branch 'patch-1' of
github.com:nivs/curator into CURATOR-420
Posted by ra...@apache.org.
Merge branch 'patch-1' of github.com:nivs/curator into CURATOR-420
Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/34be09a4
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/34be09a4
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/34be09a4
Branch: refs/heads/master
Commit: 34be09a44c7a941a95245a5bc31a11771e4f7e86
Parents: 3b9d606 b1ffac9
Author: randgalt <ra...@apache.org>
Authored: Tue Jul 11 08:56:51 2017 -0500
Committer: randgalt <ra...@apache.org>
Committed: Tue Jul 11 08:56:51 2017 -0500
----------------------------------------------------------------------
.../apache/curator/framework/recipes/shared/SharedCount.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/curator/blob/34be09a4/curator-recipes/src/main/java/org/apache/curator/framework/recipes/shared/SharedCount.java
----------------------------------------------------------------------