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 2016/02/08 19:16:04 UTC

[3/3] curator git commit: compare of CuratorWatcher is needed too

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 <ra...@apache.org>
Authored: Mon Feb 8 13:15:48 2016 -0500
Committer: randgalt <ra...@apache.org>
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;
     }