Whitespace and output formatting fixes

This commit is contained in:
Pim Otte 2017-02-21 09:48:58 +01:00 committed by AsamK
parent b0d7daeca2
commit 5845dad769
2 changed files with 8 additions and 8 deletions

View file

@ -503,9 +503,10 @@ public class Main {
}
List<GroupInfo> groups = m.getGroups();
boolean detailed = ns.getBoolean("detailed");
for (GroupInfo group : groups) {
printGroup(group, ns.getBoolean("detailed"));
printGroup(group, detailed);
}
break;
case "listIdentities":
@ -640,13 +641,12 @@ public class Main {
}
private static void printGroup(GroupInfo group, boolean detailed) {
System.out.println(String.format("Group id: %s\n Group name: %s \n active: %s",
Base64.encodeBytes(group.groupId), group.name, group.active));
if (detailed) {
System.out.println(" Members:");
for (String member : group.members) {
System.out.println(" " + member);
}
System.out.println(String.format("Id: %s Name: %s Active: %s Members: %s",
Base64.encodeBytes(group.groupId), group.name, group.active, group.members));
} else {
System.out.println(String.format("Id: %s Name: %s Active: %s", Base64.encodeBytes(group.groupId),
group.name, group.active));
}
}