assert refreshOnStart

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

Branch: refs/heads/persistent-watch
Commit: 03c9e44e7beb244e1596fbaba1c829ce48d73f84
Parents: d35a2e7
Author: randgalt <randg...@apache.org>
Authored: Fri Mar 10 15:45:20 2017 -0800
Committer: randgalt <randg...@apache.org>
Committed: Fri Mar 10 15:45:20 2017 -0800

----------------------------------------------------------------------
 .../apache/curator/framework/recipes/watch/InternalNodeCache.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/03c9e44e/curator-recipes/src/main/java/org/apache/curator/framework/recipes/watch/InternalNodeCache.java
----------------------------------------------------------------------
diff --git 
a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/watch/InternalNodeCache.java
 
b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/watch/InternalNodeCache.java
index dc0ab46..9617cda 100644
--- 
a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/watch/InternalNodeCache.java
+++ 
b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/watch/InternalNodeCache.java
@@ -91,7 +91,6 @@ class InternalNodeCache extends CuratorCacheBase
         }
     };
 
-    // TODO refreshOnStart
     InternalNodeCache(CuratorFramework client, String path, CacheAction 
cacheAction, CachedNodeComparator nodeComparator, CachedNodeMap cache, boolean 
sendRefreshEvents, boolean refreshOnStart)
     {
         super(path, cache, sendRefreshEvents);
@@ -99,6 +98,7 @@ class InternalNodeCache extends CuratorCacheBase
         this.path = PathUtils.validatePath(path);
         this.cacheAction = cacheAction;
         this.nodeComparator = nodeComparator;
+        Preconditions.checkArgument(refreshOnStart, "refreshingWhenStarted() 
must be true when forSingleNode() is used");
     }
 
     @Override

Reply via email to