remove superfluous braces, unused private method and add TreeNode serial version id
Project: http://git-wip-us.apache.org/repos/asf/curator/repo Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/939d7dce Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/939d7dce Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/939d7dce Branch: refs/heads/CURATOR-447 Commit: 939d7dce21341f0f9997b7853a3f5cda63067aea Parents: 1c7be85 Author: nickhill <nickh...@us.ibm.com> Authored: Tue Jan 2 16:36:20 2018 +0000 Committer: nickhill <nickh...@us.ibm.com> Committed: Tue Jan 9 14:52:40 2018 +0000 ---------------------------------------------------------------------- .../framework/recipes/cache/TreeCache.java | 24 ++++++++------------ 1 file changed, 9 insertions(+), 15 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/curator/blob/939d7dce/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/TreeCache.java ---------------------------------------------------------------------- diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/TreeCache.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/TreeCache.java index c908ccd..a9b8fa8 100644 --- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/TreeCache.java +++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/TreeCache.java @@ -207,7 +207,8 @@ public class TreeCache implements Closeable private final class TreeNode extends AtomicReference<ChildData> implements Watcher, BackgroundCallback { - + private static final long serialVersionUID = 4736888003207088181L; + final TreeNode parent; final String path; volatile ConcurrentMap<String, TreeNode> children; @@ -813,11 +814,6 @@ public class TreeCache implements Closeable publishEvent(new TreeCacheEvent(type, null)); } - private void publishEvent(TreeCacheEvent.Type type, String path) - { - publishEvent(new TreeCacheEvent(type, new ChildData(path, null, null))); - } - private void publishEvent(TreeCacheEvent.Type type, ChildData data) { publishEvent(new TreeCacheEvent(type, data)); @@ -833,16 +829,14 @@ public class TreeCache implements Closeable @Override public void run() { + try { - try - { - callListeners(event); - } - catch ( Exception e ) - { - ThreadUtils.checkInterrupted(e); - handleException(e); - } + callListeners(event); + } + catch ( Exception e ) + { + ThreadUtils.checkInterrupted(e); + handleException(e); } } });