Github user njhill commented on a diff in the pull request:

    https://github.com/apache/curator/pull/250#discussion_r167715799
  
    --- Diff: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/TreeCache.java
 ---
    @@ -728,13 +710,12 @@ private TreeNode find(String findPath)
         public ChildData getCurrentData(String fullPath)
         {
             TreeNode node = find(fullPath);
    -        if ( node == null || node.nodeState != NodeState.LIVE )
    +        if ( node == null )
             {
                 return null;
             }
             ChildData result = node.childData;
    -        // Double-check liveness after retreiving data.
    -        return node.nodeState == NodeState.LIVE ? result : null;
    +        return result != DEAD ? result : null;
    --- End diff --
    
    Reason was that `isLive` also checks for `null` which isn't necessary here 
(since we're returning `null` anyhow). But no harm in making it consistent.


---

Reply via email to