protected List<String> filterIdentifiers(Collection<String> identifiers) {

        // Obtain enough space for a full copy of the given identifiers
        List<String> validIdentifiers = new ArrayList<>(identifiers.size());

        // Add only valid identifiers to the copy
        for (String identifier : identifiers) {
            if (isValidIdentifier(identifier))
                validIdentifiers.add(identifier);
        }

        return validIdentifiers;

    }
Filters the given collection of strings, returning a new collection
containing only those strings which are valid identifiers. If no strings
within the collection are valid identifiers, the returned collection will
simply be empty.

@param identifiers
    The collection of strings to filter.

@return
    A new collection containing only the strings within the provided
    collection which are valid identifiers.
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/base/ModeledDirectoryObjectService.java