Github user eribeiro commented on a diff in the pull request: https://github.com/apache/zookeeper/pull/102#discussion_r87028116 --- Diff: src/java/main/org/apache/zookeeper/server/DataTree.java --- @@ -1293,13 +1293,12 @@ public synchronized WatchesSummary getWatchesSummary() { * @param pwriter the output to write to */ public void dumpEphemerals(PrintWriter pwriter) { - Set<Long> keys = ephemerals.keySet(); pwriter.println("Sessions with Ephemerals (" - + keys.size() + "):"); - for (long k : keys) { - pwriter.print("0x" + Long.toHexString(k)); + + ephemerals.keySet().size() + "):"); + for (Entry<Long, HashSet<String>> entry : ephemerals.entrySet()) { + pwriter.print("0x" + Long.toHexString(entry.getKey())); pwriter.println(":"); - HashSet<String> tmp = ephemerals.get(k); + HashSet<String> tmp = entry.getValue(); --- End diff -- Could we define `tmp` as `Set` instead of `HashSet`?
--- 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. ---