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 2013/10/08 21:45:56 UTC

git commit: validate arguments

Updated Branches:
  refs/heads/CURATOR-63 [created] a27e00e06


validate arguments


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

Branch: refs/heads/CURATOR-63
Commit: a27e00e06cc8496eaa638453b4a46372899fb8a6
Parents: ce1d8ee
Author: randgalt <ra...@apache.org>
Authored: Tue Oct 8 12:45:47 2013 -0700
Committer: randgalt <ra...@apache.org>
Committed: Tue Oct 8 12:45:47 2013 -0700

----------------------------------------------------------------------
 .../org/apache/curator/x/discovery/details/ServiceCacheImpl.java   | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-curator/blob/a27e00e0/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/details/ServiceCacheImpl.java
----------------------------------------------------------------------
diff --git a/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/details/ServiceCacheImpl.java b/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/details/ServiceCacheImpl.java
index 3d22e61..a3185f0 100644
--- a/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/details/ServiceCacheImpl.java
+++ b/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/details/ServiceCacheImpl.java
@@ -56,6 +56,8 @@ public class ServiceCacheImpl<T> implements ServiceCache<T>, PathChildrenCacheLi
 
     ServiceCacheImpl(ServiceDiscoveryImpl<T> discovery, String name, ThreadFactory threadFactory)
     {
+        Preconditions.checkNotNull(discovery, "discovery cannot be null");
+        Preconditions.checkNotNull(name, "name cannot be null");
         Preconditions.checkNotNull(threadFactory, "threadFactory cannot be null");
 
         this.discovery = discovery;