You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@curator.apache.org by ca...@apache.org on 2015/08/12 00:29:03 UTC

[2/4] curator git commit: Make getData private and access data directly in setData

Make getData private and access data directly in setData


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

Branch: refs/heads/master
Commit: 5cfa4839e0798249d32b34b792b5f59f111dd022
Parents: 7fd4034
Author: Alex Brasetvik <al...@brasetvik.com>
Authored: Mon Aug 3 01:52:51 2015 +0200
Committer: Alex Brasetvik <al...@brasetvik.com>
Committed: Mon Aug 3 01:52:51 2015 +0200

----------------------------------------------------------------------
 .../curator/framework/recipes/nodes/PersistentEphemeralNode.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/5cfa4839/curator-recipes/src/main/java/org/apache/curator/framework/recipes/nodes/PersistentEphemeralNode.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/nodes/PersistentEphemeralNode.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/nodes/PersistentEphemeralNode.java
index 1011ad5..7a2ab73 100644
--- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/nodes/PersistentEphemeralNode.java
+++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/nodes/PersistentEphemeralNode.java
@@ -338,11 +338,11 @@ public class PersistentEphemeralNode implements Closeable
         this.data.set(Arrays.copyOf(data, data.length));
         if ( isActive() )
         {
-            client.setData().inBackground().forPath(getActualPath(), getData());
+            client.setData().inBackground().forPath(getActualPath(), this.data.get());
         }
     }
 
-    byte[] getData() {
+    private byte[] getData() {
         return this.data.get();
     }