public static String[] parseGroups(String csvRoles, String csvGroups) {
    List<String> groups = new ArrayList<>();
    parseCsv(groups, csvRoles);
    parseCsv(groups, csvGroups);
    return groups.toArray(new String[groups.size()]);
  }
Parses comma-separated-roles/groups into array of groups (strings).
geode-membership/src/main/java/org/apache/geode/distributed/internal/membership/gms/GMSUtil.java