Github user revans2 commented on a diff in the pull request: https://github.com/apache/storm/pull/1047#discussion_r50842034 --- Diff: storm-core/src/jvm/org/apache/storm/utils/Utils.java --- @@ -1382,5 +1382,43 @@ public static TopologyInfo getTopologyInfo(String name, String asUser, Map storm public static int toPositive(int number) { return number & Integer.MAX_VALUE; } + + public static RuntimeException wrapInRuntime(Exception e){ + if (e instanceof RuntimeException){ + return (RuntimeException)e; + }else { + return new RuntimeException(e); + } + } + + public static List<String> tokenizePath(String path) { + String[] toks = path.split(File.separator); + java.util.ArrayList<String> rtn = new ArrayList<String>(); + for (String str : toks) { + if (!str.isEmpty()) { + rtn.add(str); + } + } + return rtn; + } + + public static String toksToPath(List<String> toks) { + StringBuffer buff = new StringBuffer(); + buff.append(File.separator); + int size = toks.size(); + for (int i = 0; i < size; i++) { + buff.append(toks.get(i)); + if (i < (size - 1)) { + buff.append(File.separator); + } + + } + return buff.toString(); + } + + public static String normalizePath(String path) { + String rtn = toksToPath(tokenizePath(path)); + return rtn; + } --- End diff -- Can we please move tokenizePath, toksToPath, and normalizePath to Zookeeper.java? and change them from using File.separator, to use "/". The issue is that they are specific to zookeeper so need the "/", without it on windows it will not work. They should never have been in util.clj to begin with. I'll update the util.clj JIRA to indicate this too.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---