curator-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From randg...@apache.org
Subject [1/3] git commit: null checks
Date Tue, 27 May 2014 22:17:52 GMT
Repository: curator
Updated Branches:
  refs/heads/curator-rpc 01e9cb0a8 -> 7f90dc40f


null checks


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

Branch: refs/heads/curator-rpc
Commit: 3b5779841b02fd33e186dfc28bba463c7451dea8
Parents: 01e9cb0
Author: randgalt <randgalt@apache.org>
Authored: Tue May 27 15:44:29 2014 -0500
Committer: randgalt <randgalt@apache.org>
Committed: Tue May 27 15:44:29 2014 -0500

----------------------------------------------------------------------
 .../src/main/java/org/apache/curator/x/rpc/CuratorEntry.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/3b577984/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/CuratorEntry.java
----------------------------------------------------------------------
diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/CuratorEntry.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/CuratorEntry.java
index bd6f207..c0e3524 100644
--- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/CuratorEntry.java
+++ b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/CuratorEntry.java
@@ -101,13 +101,13 @@ public class CuratorEntry implements Closeable
 
     public <T> T getThing(String id, Class<T> clazz)
     {
-        Entry entry = things.get(id);
+        Entry entry = (id != null) ? things.get(id) : null;
         return cast(clazz, entry);
     }
 
     public boolean closeThing(String id)
     {
-        Entry entry = things.remove(id);
+        Entry entry = (id != null) ? things.remove(id) : null;
         if ( entry != null )
         {
             //noinspection unchecked


Mime
View raw message