Github user dragonsinth commented on a diff in the pull request:
https://github.com/apache/curator/pull/250#discussion_r167673343
--- 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 --
shouldn't this be `isLive` for consistency?
---