protected static Set<String> splitGroupList( String csv )
    {
        final Set<String> result = new HashSet<>();
        final StringTokenizer tokenizer = new StringTokenizer(csv, ",\t\n\r\f");
        while ( tokenizer.hasMoreTokens() )
        {
            result.add(tokenizer.nextToken().trim());
        }

        return result;
    }
Splits a comma-separated string of group name in a set of group names.
@param csv The comma-separated list. Cannot be null.
@return A set of group names.
xmppserver/src/main/java/org/jivesoftware/openfire/group/GroupManager.java