Github user jaredjstewart commented on a diff in the pull request: https://github.com/apache/geode/pull/596#discussion_r123820699 --- Diff: geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ClientCommands.java --- @@ -109,12 +107,10 @@ public Result listClient() { } String memberSeparator = "; "; - Iterator<Entry<String, List<String>>> it = clientServerMap.entrySet().iterator(); - while (it.hasNext()) { - Map.Entry<String, List<String>> pairs = (Map.Entry<String, List<String>>) it.next(); - String client = (String) pairs.getKey(); - List<String> servers = (List<String>) pairs.getValue(); + for (Entry<String, List<String>> pairs : clientServerMap.entrySet()) { + String client = pairs.getKey(); + List<String> servers = pairs.getValue(); StringBuilder serverListForClient = new StringBuilder(); --- End diff -- Since we're already cleaning up this section of the code, it might be worth considering replacing 114-123 with a one liner: ``` String serverListForClient = servers.stream().collect(Collectors.joining(memberSeparator)); ```
--- 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. ---