mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Gaetan Boismal
28.52.2014 a4e2fc0298e8d60aa0e4bcfd3304303d952e0972
opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/LDAPSearch.java
@@ -63,7 +63,6 @@
import org.forgerock.opendj.ldap.controls.SimplePagedResultsControl;
import org.forgerock.opendj.ldap.controls.VirtualListViewRequestControl;
import org.forgerock.opendj.ldap.controls.VirtualListViewResponseControl;
import org.forgerock.opendj.ldap.requests.BindRequest;
import org.forgerock.opendj.ldap.requests.Requests;
import org.forgerock.opendj.ldap.requests.SearchRequest;
import org.forgerock.opendj.ldap.responses.Result;
@@ -89,7 +88,6 @@
import static com.forgerock.opendj.cli.ArgumentConstants.*;
import static com.forgerock.opendj.cli.Utils.*;
import static com.forgerock.opendj.ldap.tools.ToolsMessages.*;
import static com.forgerock.opendj.ldap.tools.Utils.*;
/**
 * A tool that can be used to issue Search requests to the Directory Server.
@@ -241,7 +239,6 @@
                        "[filter] [attributes ...]");
        ConnectionFactoryProvider connectionFactoryProvider;
        ConnectionFactory connectionFactory;
        BindRequest bindRequest;
        BooleanArgument countEntries;
        BooleanArgument dontWrap;
@@ -443,8 +440,7 @@
                return 0;
            }
            connectionFactory = connectionFactoryProvider.getConnectionFactory();
            bindRequest = connectionFactoryProvider.getBindRequest();
            connectionFactory = connectionFactoryProvider.getAuthenticatedConnectionFactory();
        } catch (final ArgumentException ae) {
            final LocalizableMessage message = ERR_ERROR_PARSING_ARGS.get(ae.getMessage());
            errPrintln(message);
@@ -829,13 +825,11 @@
        Connection connection;
        try {
            connection = connectionFactory.getConnection();
            if (bindRequest != null) {
                printPasswordPolicyResults(this, connection.bind(bindRequest));
            }
        } catch (final LdapException ere) {
            return printErrorMessage(this, ere);
            return Utils.printErrorMessage(this, ere);
        }
        Utils.printPasswordPolicyResults(this, connection);
        try {
            int filterIndex = 0;