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

Gaetan Boismal
19.56.2014 d94f6d23898f7515e969517f85b8e626667a1e02
opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/AuthRate.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2010 Sun Microsystems, Inc.
 *      Portions copyright 2011-2014 ForgeRock AS
 *      Portions Copyright 2011-2014 ForgeRock AS
 */
package com.forgerock.opendj.ldap.tools;
@@ -38,7 +38,7 @@
import org.forgerock.opendj.ldap.Connection;
import org.forgerock.opendj.ldap.ConnectionFactory;
import org.forgerock.opendj.ldap.DereferenceAliasesPolicy;
import org.forgerock.opendj.ldap.ErrorResultException;
import org.forgerock.opendj.ldap.LdapException;
import org.forgerock.opendj.ldap.ResultCode;
import org.forgerock.opendj.ldap.SearchScope;
import org.forgerock.opendj.ldap.requests.BindRequest;
@@ -104,7 +104,7 @@
            }
            @Override
            public void handleError(final ErrorResultException error) {
            public void handleError(final LdapException error) {
                super.handleError(error);
                if (error.getResult().getResultCode() == ResultCode.INVALID_CREDENTIALS) {
@@ -134,7 +134,7 @@
            }
            @Override
            public Promise<?, ErrorResultException> performOperation(final Connection connection,
            public Promise<?, LdapException> performOperation(final Connection connection,
                    final DataSource[] dataSources, final long startTime) {
                if (dataSources != null) {
                    data = DataSource.generateData(dataSources, data);
@@ -145,7 +145,7 @@
                    }
                }
                Promise<BindResult, ErrorResultException> returnedPromise;
                Promise<BindResult, LdapException> returnedPromise;
                if (filter != null && baseDN != null) {
                    if (sr == null) {
                        if (dataSources == null) {
@@ -161,10 +161,10 @@
                    }
                    returnedPromise = connection.searchSingleEntryAsync(sr).thenAsync(
                            new AsyncFunction<SearchResultEntry, BindResult, ErrorResultException>() {
                            new AsyncFunction<SearchResultEntry, BindResult, LdapException>() {
                                @Override
                                public Promise<BindResult, ErrorResultException> apply(SearchResultEntry result)
                                        throws ErrorResultException {
                                public Promise<BindResult, LdapException> apply(SearchResultEntry result)
                                        throws LdapException {
                                    searchWaitRecentTime.getAndAdd(System.nanoTime() - startTime);
                                    if (data == null) {
                                        data = new Object[1];
@@ -182,7 +182,7 @@
                        new BindUpdateStatsResultHandler(startTime));
            }
            private Promise<BindResult, ErrorResultException> performBind(final Connection connection,
            private Promise<BindResult, LdapException> performBind(final Connection connection,
                final Object[] data) {
                final boolean useInvalidPassword;