    public <T> List<T> search(String filter, Object[] filterArgs, Mapper<T> mapper, int maxResult) {
        List<T> results = new ArrayList<>();
        DirContext dirContext = getDirContext(ldapConfiguration, ldapConfiguration.getManagerDn(), ldapConfiguration.getPassword());

        try {
            List<SearchResult> searchResults = search(dirContext, filter, filterArgs, maxResult, false);

            for (SearchResult result : searchResults) {
                results.add(mapper.mapObject(new ResultWrapper(result.getAttributes())));
            }
        } catch (NamingException e) {
            throw new LdapException(e);
        } finally {
            closeContextSilently(dirContext);
        }

        return results;
    }
The software constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.