Repository: curator Updated Branches: refs/heads/CURATOR-397 70936c8c4 -> a4636098f
make parameter the empty string Project: http://git-wip-us.apache.org/repos/asf/curator/repo Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/a4636098 Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/a4636098 Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/a4636098 Branch: refs/heads/CURATOR-397 Commit: a4636098f6a6a679c06f337f981fd17d6b383218 Parents: 70936c8 Author: randgalt <randg...@apache.org> Authored: Sun Apr 30 14:12:18 2017 -0500 Committer: randgalt <randg...@apache.org> Committed: Sun Apr 30 14:12:18 2017 -0500 ---------------------------------------------------------------------- .../org/apache/curator/x/async/modeled/details/ZPathImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/curator/blob/a4636098/curator-x-async/src/main/java/org/apache/curator/x/async/modeled/details/ZPathImpl.java ---------------------------------------------------------------------- diff --git a/curator-x-async/src/main/java/org/apache/curator/x/async/modeled/details/ZPathImpl.java b/curator-x-async/src/main/java/org/apache/curator/x/async/modeled/details/ZPathImpl.java index e728537..3880649 100644 --- a/curator-x-async/src/main/java/org/apache/curator/x/async/modeled/details/ZPathImpl.java +++ b/curator-x-async/src/main/java/org/apache/curator/x/async/modeled/details/ZPathImpl.java @@ -38,7 +38,7 @@ public class ZPathImpl implements ZPath { public static final ZPath root = new ZPathImpl(Collections.singletonList(ZKPaths.PATH_SEPARATOR), null, null); - public static final String parameter = "\u0000"; // PathUtils.validatePath() rejects this so it's useful for this purpose + public static final String parameter = ""; // empty paths are illegal so it's useful for this purpose private final List<String> nodes; private final boolean isResolved; @@ -142,7 +142,8 @@ public class ZPathImpl implements ZPath @Override public String toString() { - return "ZPathImpl{" + "nodes=" + nodes + '}'; + String value = nodes.stream().map(name -> name.equals(parameter) ? "{p}" : name).collect(Collectors.joining(ZKPaths.PATH_SEPARATOR, ZKPaths.PATH_SEPARATOR, "")); + return "ZPathImpl{" + value + '}'; } @Override