groups.put(Base64.encodeBytes(group.groupId), group);
}
- GroupInfo getGroup(byte[] groupId) {
- return groups.get(Base64.encodeBytes(groupId));
+ GroupInfo getGroup(byte[] groupId) throws GroupNotFoundException {
+ GroupInfo g = groups.get(Base64.encodeBytes(groupId));
+ if (g == null) {
+ throw new GroupNotFoundException(groupId);
+ }
+ return g;
}
public static class MapToListSerializer extends JsonSerializer<Map<?, ?>> {