/** * Returns a collection of Groups obtained by parsing a comma delimited String with the name * of groups. * * @param groupNames a comma delimited string with group names. * @return a collection of Groups obtained by parsing a comma delimited String with the name * of groups. */ private Collection<Group> parseGroups(String groupNames) { Collection<Group> answer = new HashSet<>(); for (String groupName : parseGroupNames(groupNames)) { try { answer.add(GroupManager.getInstance().getGroup(groupName)); } catch (GroupNotFoundException e) { // Do nothing. Silently ignore the invalid reference to the group } } return answer; }
/** * Returns a collection of Groups obtained by parsing a comma delimited String with the name * of groups. * * @param groupNames a comma delimited string with group names. * @return a collection of Groups obtained by parsing a comma delimited String with the name * of groups. */ private Collection<Group> parseGroups(String groupNames) { Collection<Group> answer = new HashSet<>(); for (String groupName : parseGroupNames(groupNames)) { try { answer.add(GroupManager.getInstance().getGroup(groupName)); } catch (GroupNotFoundException e) { // Do nothing. Silently ignore the invalid reference to the group } } return answer; }