@Test public void testLenientPaths() { assertEquals("/", ZooKeeperUtils.normalizePath(" assertEquals("/a/group", ZooKeeperUtils.normalizePath("/a/group")); assertEquals("/a/group", ZooKeeperUtils.normalizePath("/a/group/")); assertEquals("/a/group", ZooKeeperUtils.normalizePath("/a assertEquals("/a/group", ZooKeeperUtils.normalizePath("/a try { ZooKeeperUtils.normalizePath("a/group"); fail("Relative paths should not be allowed."); } catch (IllegalArgumentException e) { } try { ZooKeeperUtils.normalizePath("/a/./group"); fail("Relative paths should not be allowed."); } catch (IllegalArgumentException e) { } try { ZooKeeperUtils.normalizePath("/a/../group"); fail("Relative paths should not be allowed."); } catch (IllegalArgumentException e) { } }
static String normalizePath(String path) { String normalizedPath = path.replaceAll(" PathUtils.validatePath(normalizedPath); return normalizedPath; }
ZooKeeperUtils { static String normalizePath(String path) { String normalizedPath = path.replaceAll(" PathUtils.validatePath(normalizedPath); return normalizedPath; } }
ZooKeeperUtils { static String normalizePath(String path) { String normalizedPath = path.replaceAll(" PathUtils.validatePath(normalizedPath); return normalizedPath; } private  ZooKeeperUtils(); }
ZooKeeperUtils { static String normalizePath(String path) { String normalizedPath = path.replaceAll(" PathUtils.validatePath(normalizedPath); return normalizedPath; } private  ZooKeeperUtils();  }
ZooKeeperUtils { static String normalizePath(String path) { String normalizedPath = path.replaceAll(" PathUtils.validatePath(normalizedPath); return normalizedPath; } private  ZooKeeperUtils();  static final Amount<Integer,Time> DEFAULT_ZK_SESSION_TIMEOUT; static final Amount<Integer,Time> DEFAULT_ZK_CONNECTION_TIMEOUT; static final ImmutableList<ACL> OPEN_ACL_UNSAFE; static final ImmutableList<ACL> EVERYONE_READ_CREATOR_ALL; }