Repository: curator Updated Branches: refs/heads/namespace-watcher-equality-change [created] 5fb194fcc
Don't allow NamespaceWatcher to compare equal to a raw Watcher or CuratorWatcher. It can't be done reciprocally in a raw Watcher and is actually unnecessary. NOTE: a Curator Tech Note should be written to warn that Watchers are wrapped internally Project: http://git-wip-us.apache.org/repos/asf/curator/repo Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/5fb194fc Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/5fb194fc Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/5fb194fc Branch: refs/heads/namespace-watcher-equality-change Commit: 5fb194fcc7a1fa9d7e409a511177a3098a32d0dd Parents: dce3146 Author: randgalt <[email protected]> Authored: Wed Feb 10 12:22:24 2016 -0500 Committer: randgalt <[email protected]> Committed: Wed Feb 10 12:22:24 2016 -0500 ---------------------------------------------------------------------- .../apache/curator/framework/imps/NamespaceWatcher.java | 11 ----------- 1 file changed, 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/curator/blob/5fb194fc/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 5da1384..b81290c 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,17 +121,6 @@ class NamespaceWatcher implements Watcher, Closeable return curatorWatcher != null ? curatorWatcher.equals(watcher.curatorWatcher) : watcher.curatorWatcher == null; } - if ( Watcher.class.isAssignableFrom(o.getClass()) ) - { - return actualWatcher == o; - } - - //noinspection SimplifiableIfStatement - if ( CuratorWatcher.class.isAssignableFrom(o.getClass()) ) - { - return curatorWatcher == o; - } - return false; }
