compare of CuratorWatcher is needed too
Project: http://git-wip-us.apache.org/repos/asf/curator/repo Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/d192209d Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/d192209d Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/d192209d Branch: refs/heads/CURATOR-299 Commit: d192209dfa8ee8539bfc1f443d32b3a0446fee33 Parents: f85628a Author: randgalt <[email protected]> Authored: Mon Feb 8 13:15:48 2016 -0500 Committer: randgalt <[email protected]> Committed: Mon Feb 8 13:15:48 2016 -0500 ---------------------------------------------------------------------- .../org/apache/curator/framework/imps/NamespaceWatcher.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/curator/blob/d192209d/curator-framework/src/main/java/org/apache/curator/framework/imps/NamespaceWatcher.java ---------------------------------------------------------------------- diff --git a/curator-framework/src/main/java/org/apache/curator/framework/imps/NamespaceWatcher.java b/curator-framework/src/main/java/org/apache/curator/framework/imps/NamespaceWatcher.java index e597095..5da1384 100644 --- a/curator-framework/src/main/java/org/apache/curator/framework/imps/NamespaceWatcher.java +++ b/curator-framework/src/main/java/org/apache/curator/framework/imps/NamespaceWatcher.java @@ -121,12 +121,17 @@ class NamespaceWatcher implements Watcher, Closeable return curatorWatcher != null ? curatorWatcher.equals(watcher.curatorWatcher) : watcher.curatorWatcher == null; } - //noinspection SimplifiableIfStatement if ( Watcher.class.isAssignableFrom(o.getClass()) ) { return actualWatcher == o; } + //noinspection SimplifiableIfStatement + if ( CuratorWatcher.class.isAssignableFrom(o.getClass()) ) + { + return curatorWatcher == o; + } + return false; }
