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

Jean-Noël Rouvignac
09.27.2016 dd6204a4dc4b4b611a8894e22437fc7f6d7e7ec8
opendj-sdk/opendj-cli/src/main/java/com/forgerock/opendj/cli/ArgumentGroup.java
@@ -12,7 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2008 Sun Microsystems, Inc.
 * Portions copyright 2012-2015 ForgeRock AS.
 * Portions copyright 2012-2016 ForgeRock AS.
 */
package com.forgerock.opendj.cli;
@@ -50,7 +50,6 @@
        this.priority = priority;
    }
    /** {@inheritDoc} */
    @Override
    public int compareTo(final ArgumentGroup o) {
        // Groups with higher priority numbers appear before
@@ -92,7 +91,7 @@
     * @return boolean where true means this group contains members
     */
    boolean containsArguments() {
        return this.args.size() > 0;
        return !args.isEmpty();
    }
    /**
@@ -148,7 +147,6 @@
        this.description = description;
    }
    /** {@inheritDoc} */
    @Override
    public String toString() {
        return getClass().getSimpleName() + "(description=" + description + ")";
opendj-sdk/opendj-cli/src/main/java/com/forgerock/opendj/cli/TabSeparatedTablePrinter.java
@@ -12,7 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2008 Sun Microsystems, Inc.
 * Portions Copyright 2014 ForgeRock AS.
 * Portions Copyright 2014-2016 ForgeRock AS.
 */
package com.forgerock.opendj.cli;
@@ -29,10 +29,7 @@
 * a single space.
 */
public final class TabSeparatedTablePrinter extends TablePrinter {
    /**
     * Table serializer implementation.
     */
    /** Table serializer implementation. */
    private final class Serializer extends TableSerializer {
        /**
         * Counts the number of separators that should be output the next time a non-empty cell is displayed. The tab
@@ -45,7 +42,6 @@
            // No implementation required.
        }
        /** {@inheritDoc} */
        @Override
        public void addCell(String s) {
            // Avoid printing tab separators for trailing empty cells.
@@ -62,7 +58,6 @@
            writer.print(s.replaceAll("[\\t\\n\\r]", " "));
        }
        /** {@inheritDoc} */
        @Override
        public void addHeading(String s) {
            if (displayHeadings) {
@@ -70,7 +65,6 @@
            }
        }
        /** {@inheritDoc} */
        @Override
        public void endHeader() {
            if (displayHeadings) {
@@ -78,25 +72,21 @@
            }
        }
        /** {@inheritDoc} */
        @Override
        public void endRow() {
            writer.println();
        }
        /** {@inheritDoc} */
        @Override
        public void endTable() {
            writer.flush();
        }
        /** {@inheritDoc} */
        @Override
        public void startHeader() {
            requiredSeparators = 0;
        }
        /** {@inheritDoc} */
        @Override
        public void startRow() {
            requiredSeparators = 0;
@@ -140,10 +130,8 @@
        this.displayHeadings = displayHeadings;
    }
    /** {@inheritDoc} */
    @Override
    protected TableSerializer getSerializer() {
        return new Serializer();
    }
}
opendj-sdk/opendj-cli/src/main/java/com/forgerock/opendj/cli/TextTablePrinter.java
@@ -12,7 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2007-2008 Sun Microsystems, Inc.
 * Portions Copyright 2014-2015 ForgeRock AS.
 * Portions Copyright 2014-2016 ForgeRock AS.
 */
package com.forgerock.opendj.cli;
@@ -32,12 +32,8 @@
 * Tables have configurable column widths, padding, and column separators.
 */
public final class TextTablePrinter extends TablePrinter {
    /**
     * Table serializer implementation.
     */
    /** Table serializer implementation. */
    private final class Serializer extends TableSerializer {
        /**The real column widths taking into account size constraints but
         not including padding or separators.*/
        private final List<Integer> columnWidths = new ArrayList<>();
@@ -61,20 +57,17 @@
            this.indentPadding = builder.toString();
        }
        /** {@inheritDoc} */
        @Override
        public void addCell(String s) {
            currentRow.add(s);
        }
        /** {@inheritDoc} */
        @Override
        public void addColumn(int width) {
            columnWidths.add(width);
            totalColumns++;
        }
        /** {@inheritDoc} */
        @Override
        public void addHeading(String s) {
            if (displayHeadings) {
@@ -82,7 +75,6 @@
            }
        }
        /** {@inheritDoc} */
        @Override
        public void endHeader() {
            if (displayHeadings) {
@@ -123,7 +115,6 @@
            }
        }
        /** {@inheritDoc} */
        @Override
        public void endRow() {
            boolean isRemainingText;
@@ -148,7 +139,6 @@
                            endIndex = width;
                            head = contents.substring(0, endIndex);
                            tail = contents.substring(endIndex);
                        } else {
                            head = contents.substring(0, endIndex);
                            tail = contents.substring(endIndex + 1);
@@ -194,24 +184,20 @@
                // Output the line.
                writer.println(builder.toString());
            } while (isRemainingText);
        }
        /** {@inheritDoc} */
        @Override
        public void endTable() {
            writer.flush();
        }
        /** {@inheritDoc} */
        @Override
        public void startHeader() {
            determineColumnWidths();
            currentRow.clear();
        }
        /** {@inheritDoc} */
        @Override
        public void startRow() {
            currentRow.clear();
@@ -302,10 +288,7 @@
    /** The number of characters the table should be indented. */
    private int indentWidth;
    /**
     * The character which should be used to separate the table
     * heading row from the rows beneath.
     */
    /** The character which should be used to separate the table heading row from the rows beneath. */
    private char headingSeparator = DEFAULT_HEADING_SEPARATOR;
    /** The column where the heading separator should begin. */
@@ -317,10 +300,7 @@
     */
    private int padding = DEFAULT_PADDING;
    /**
     * Total permitted width for the table which expandable columns
     * can use up.
     */
    /** Total permitted width for the table which expandable columns can use up. */
    private int totalWidth = MAX_LINE_WIDTH;
    /** The output destination. */
@@ -462,7 +442,6 @@
        this.totalWidth = totalWidth;
    }
    /** {@inheritDoc} */
    @Override
    protected TableSerializer getSerializer() {
        return new Serializer();
opendj-sdk/opendj-cli/src/test/java/com/forgerock/opendj/cli/ConsoleApplicationTestCase.java
@@ -11,7 +11,7 @@
 * Header, with the fields enclosed by brackets [] replaced by your own identifying
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2014 ForgeRock AS.
 * Copyright 2014-2016 ForgeRock AS.
 */
package com.forgerock.opendj.cli;
@@ -26,19 +26,14 @@
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertTrue;
/**
 * Unit tests for the console application class.
 */
/** Unit tests for the console application class. */
@SuppressWarnings("javadoc")
public class ConsoleApplicationTestCase extends CliTestCase {
    final LocalizableMessage msg = LocalizableMessage.raw("Language is the source of misunderstandings.");
    final LocalizableMessage msg2 = LocalizableMessage
            .raw("If somebody wants a sheep, that is a proof that one exists.");
    /**
     * For test purposes only.
     */
    /** For test purposes only. */
    private static class MockConsoleApplication extends ConsoleApplication {
        private static ByteArrayOutputStream out;
        private static ByteArrayOutputStream err;
@@ -66,19 +61,16 @@
            return err.toString("UTF-8");
        }
        /** {@inheritDoc} */
        @Override
        public boolean isVerbose() {
            return verbose;
        }
        /** {@inheritDoc} */
        @Override
        public boolean isInteractive() {
            return interactive;
        }
        /** {@inheritDoc} */
        @Override
        public boolean isQuiet() {
            return quiet;
opendj-sdk/opendj-core/src/main/java/com/forgerock/opendj/ldap/extensions/GetConnectionIDExtendedResult.java
@@ -12,9 +12,8 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2010 Sun Microsystems, Inc.
 * Portions copyright 2012-2013 ForgeRock AS.
 * Portions copyright 2012-2016 ForgeRock AS.
 */
package com.forgerock.opendj.ldap.extensions;
import java.io.IOException;
@@ -65,13 +64,11 @@
        return connectionID;
    }
    /** {@inheritDoc} */
    @Override
    public String getOID() {
        return GetConnectionIDExtendedRequest.OID;
    }
    /** {@inheritDoc} */
    @Override
    public ByteString getValue() {
        final ByteStringBuilder buffer = new ByteStringBuilder(6);
@@ -87,7 +84,6 @@
        return buffer.toByteString();
    }
    /** {@inheritDoc} */
    @Override
    public boolean hasValue() {
        return true;
@@ -105,7 +101,6 @@
        return this;
    }
    /** {@inheritDoc} */
    @Override
    public String toString() {
        final StringBuilder builder = new StringBuilder();
opendj-sdk/opendj-core/src/main/java/com/forgerock/opendj/ldap/extensions/GetSymmetricKeyExtendedRequest.java
@@ -39,14 +39,11 @@
import org.forgerock.opendj.ldap.responses.ExtendedResultDecoder;
import org.forgerock.opendj.ldap.responses.Responses;
/**
 * Get symmetric key extended request.
 */
/** Get symmetric key extended request. */
public final class GetSymmetricKeyExtendedRequest extends
        AbstractExtendedRequest<GetSymmetricKeyExtendedRequest, ExtendedResult> {
    private static final class RequestDecoder implements
            ExtendedRequestDecoder<GetSymmetricKeyExtendedRequest, ExtendedResult> {
        @Override
        public GetSymmetricKeyExtendedRequest decodeExtendedRequest(
                final ExtendedRequest<?> request, final DecodeOptions options)
@@ -92,7 +89,6 @@
    }
    private static final class ResultDecoder extends AbstractExtendedResultDecoder<ExtendedResult> {
        @Override
        public ExtendedResult newExtendedErrorResult(final ResultCode resultCode,
                final String matchedDN, final String diagnosticMessage) {
@@ -109,28 +105,14 @@
    private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
    /**
     * The request OID for the get symmetric key extended operation.
     */
    /** The request OID for the get symmetric key extended operation. */
    public static final String OID = "1.3.6.1.4.1.26027.1.6.3";
    /**
     * The BER type value for the symmetric key element of the operation value.
     */
    /** The BER type value for the symmetric key element of the operation value. */
    private static final byte TYPE_SYMMETRIC_KEY_ELEMENT = (byte) 0x80;
    /**
     * The BER type value for the instance key ID element of the operation
     * value.
     */
    /** The BER type value for the instance key ID element of the operation value. */
    private static final byte TYPE_INSTANCE_KEY_ID_ELEMENT = (byte) 0x81;
    /**
     * A decoder which can be used to decode get symmetric key extended
     * operation requests.
     */
    /** A decoder which can be used to decode get symmetric key extended operation requests. */
    public static final RequestDecoder REQUEST_DECODER = new RequestDecoder();
    /** No need to expose this. */
    private static final ResultDecoder RESULT_DECODER = new ResultDecoder();
@@ -159,7 +141,6 @@
        return instanceKeyID;
    }
    /** {@inheritDoc} */
    @Override
    public String getOID() {
        return OID;
@@ -174,13 +155,11 @@
        return requestSymmetricKey;
    }
    /** {@inheritDoc} */
    @Override
    public ExtendedResultDecoder<ExtendedResult> getResultDecoder() {
        return RESULT_DECODER;
    }
    /** {@inheritDoc} */
    @Override
    public ByteString getValue() {
        final ByteStringBuilder buffer = new ByteStringBuilder();
@@ -203,7 +182,6 @@
        return buffer.toByteString();
    }
    /** {@inheritDoc} */
    @Override
    public boolean hasValue() {
        return true;
@@ -233,7 +211,6 @@
        return this;
    }
    /** {@inheritDoc} */
    @Override
    public String toString() {
        final StringBuilder builder = new StringBuilder();
opendj-sdk/opendj-core/src/main/java/com/forgerock/opendj/ldap/extensions/PasswordPolicyStateExtendedRequest.java
@@ -12,9 +12,8 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2010 Sun Microsystems, Inc.
 * Portions Copyright 2011-2015 ForgeRock AS.
 * Portions Copyright 2011-2016 ForgeRock AS.
 */
package com.forgerock.opendj.ldap.extensions;
import java.io.IOException;
@@ -140,7 +139,6 @@
            return values;
        }
        /** {@inheritDoc} */
        @Override
        public String toString() {
            return property + ": " + values;
@@ -150,7 +148,6 @@
    private static final class RequestDecoder
            implements
            ExtendedRequestDecoder<PasswordPolicyStateExtendedRequest, PasswordPolicyStateExtendedResult> {
        @Override
        public PasswordPolicyStateExtendedRequest decodeExtendedRequest(
                final ExtendedRequest<?> request, final DecodeOptions options)
@@ -186,8 +183,6 @@
    private static final class ResultDecoder extends
            AbstractExtendedResultDecoder<PasswordPolicyStateExtendedResult> {
        /** {@inheritDoc} */
        @Override
        public PasswordPolicyStateExtendedResult newExtendedErrorResult(
                final ResultCode resultCode, final String matchedDN, final String diagnosticMessage) {
@@ -273,10 +268,7 @@
            "Seconds Until Required Change Time";
    static final String PASSWORD_HISTORY_NAME = "Password History";
    /**
     * A decoder which can be used to decode password policy state extended
     * operation requests.
     */
    /** A decoder which can be used to decode password policy state extended operation requests. */
    public static final RequestDecoder REQUEST_DECODER = new RequestDecoder();
    /** No need to expose this. */
@@ -352,9 +344,7 @@
        }
    }
    /**
     * Creates a new password policy state extended request.
     */
    /** Creates a new password policy state extended request. */
    public PasswordPolicyStateExtendedRequest() {
        // Nothing to do.
    }
@@ -379,256 +369,189 @@
        setDateProperty(ADD_GRACE_LOGIN_USE_TIME, date);
    }
    /** {@inheritDoc} */
    @Override
    public void addOperation(final PasswordPolicyStateOperation operation) {
        operations.add(operation);
    }
    /**
     * Clears the account disabled state.
     */
    /** Clears the account disabled state. */
    public void clearAccountDisabledState() {
        operations.add(PasswordPolicyStateOperationType.CLEAR_ACCOUNT_DISABLED_STATE);
    }
    /**
     * Clears the account expiration time.
     */
    /** Clears the account expiration time. */
    public void clearAccountExpirationTime() {
        operations.add(PasswordPolicyStateOperationType.CLEAR_ACCOUNT_EXPIRATION_TIME);
    }
    /**
     * Clears the authentication failure times.
     */
    /** Clears the authentication failure times. */
    public void clearAuthenticationFailureTimes() {
        operations.add(PasswordPolicyStateOperationType.CLEAR_AUTHENTICATION_FAILURE_TIMES);
    }
    /**
     * Clears the grace login use times.
     */
    /** Clears the grace login use times. */
    public void clearGraceLoginUseTimes() {
        operations.add(PasswordPolicyStateOperationType.CLEAR_GRACE_LOGIN_USE_TIMES);
    }
    /**
     * Clears the last login time.
     */
    /** Clears the last login time. */
    public void clearLastLoginTime() {
        operations.add(PasswordPolicyStateOperationType.CLEAR_LAST_LOGIN_TIME);
    }
    /**
     * Clears the password changed by required time.
     */
    /** Clears the password changed by required time. */
    public void clearPasswordChangedByRequiredTime() {
        operations.add(PasswordPolicyStateOperationType.CLEAR_PASSWORD_CHANGED_BY_REQUIRED_TIME);
    }
    /**
     * Clears the password changed time.
     */
    /** Clears the password changed time. */
    public void clearPasswordChangedTime() {
        operations.add(PasswordPolicyStateOperationType.CLEAR_PASSWORD_CHANGED_TIME);
    }
    /**
     * Clears the password expiration warned time.
     */
    /** Clears the password expiration warned time. */
    public void clearPasswordExpirationWarnedTime() {
        operations.add(PasswordPolicyStateOperationType.CLEAR_PASSWORD_EXPIRATION_WARNED_TIME);
    }
    /**
     * Clears the password history.
     */
    /** Clears the password history. */
    public void clearPasswordHistory() {
        operations.add(PasswordPolicyStateOperationType.CLEAR_PASSWORD_HISTORY);
    }
    /**
     * Clears the password reset state.
     */
    /** Clears the password reset state. */
    public void clearPasswordResetState() {
        operations.add(PasswordPolicyStateOperationType.CLEAR_PASSWORD_RESET_STATE);
    }
    /** {@inheritDoc} */
    @Override
    public String getOID() {
        return OID;
    }
    /** {@inheritDoc} */
    @Override
    public Iterable<PasswordPolicyStateOperation> getOperations() {
        return operations;
    }
    /** {@inheritDoc} */
    @Override
    public ExtendedResultDecoder<PasswordPolicyStateExtendedResult> getResultDecoder() {
        return RESULT_DECODER;
    }
    /** {@inheritDoc} */
    @Override
    public String getTargetUser() {
        return targetUser;
    }
    /** {@inheritDoc} */
    @Override
    public ByteString getValue() {
        return encode(targetUser, operations);
    }
    /** {@inheritDoc} */
    @Override
    public boolean hasValue() {
        return true;
    }
    /**
     * Returns the account disabled state.
     */
    /** Returns the account disabled state. */
    public void requestAccountDisabledState() {
        operations.add(PasswordPolicyStateOperationType.GET_ACCOUNT_DISABLED_STATE);
    }
    /**
     * Returns the account expiration time.
     */
    /** Returns the account expiration time. */
    public void requestAccountExpirationTime() {
        operations.add(PasswordPolicyStateOperationType.GET_ACCOUNT_EXPIRATION_TIME);
    }
    /**
     * Returns the authentication failure times.
     */
    /** Returns the authentication failure times. */
    public void requestAuthenticationFailureTimes() {
        operations.add(PasswordPolicyStateOperationType.GET_AUTHENTICATION_FAILURE_TIMES);
    }
    /**
     * Returns the grace login use times.
     */
    /** Returns the grace login use times. */
    public void requestGraceLoginUseTimes() {
        operations.add(PasswordPolicyStateOperationType.GET_GRACE_LOGIN_USE_TIMES);
    }
    /**
     * Returns the last login time.
     */
    /** Returns the last login time. */
    public void requestLastLoginTime() {
        operations.add(PasswordPolicyStateOperationType.GET_LAST_LOGIN_TIME);
    }
    /**
     * Returns the password changed by required time.
     */
    /** Returns the password changed by required time. */
    public void requestPasswordChangedByRequiredTime() {
        operations.add(PasswordPolicyStateOperationType.GET_PASSWORD_CHANGED_BY_REQUIRED_TIME);
    }
    /**
     * Returns the password changed time.
     */
    /** Returns the password changed time. */
    public void requestPasswordChangedTime() {
        operations.add(PasswordPolicyStateOperationType.GET_PASSWORD_CHANGED_TIME);
    }
    /**
     * Returns the password expiration warned time.
     */
    /** Returns the password expiration warned time. */
    public void requestPasswordExpirationWarnedTime() {
        operations.add(PasswordPolicyStateOperationType.GET_PASSWORD_EXPIRATION_WARNED_TIME);
    }
    /**
     * Returns the password history.
     */
    /** Returns the password history. */
    public void requestPasswordHistory() {
        operations.add(PasswordPolicyStateOperationType.GET_PASSWORD_HISTORY);
    }
    /**
     * Returns the password policy DN.
     */
    /** Returns the password policy DN. */
    public void requestPasswordPolicyDN() {
        operations.add(PasswordPolicyStateOperationType.GET_PASSWORD_POLICY_DN);
    }
    /**
     * Returns the password reset state.
     */
    /** Returns the password reset state. */
    public void requestPasswordResetState() {
        operations.add(PasswordPolicyStateOperationType.GET_PASSWORD_RESET_STATE);
    }
    /**
     * Returns the remaining authentication failure count.
     */
    /** Returns the remaining authentication failure count. */
    public void requestRemainingAuthenticationFailureCount() {
        operations.add(PasswordPolicyStateOperationType.GET_REMAINING_AUTHENTICATION_FAILURE_COUNT);
    }
    /**
     * Returns the remaining grace login count.
     */
    /** Returns the remaining grace login count. */
    public void requestRemainingGraceLoginCount() {
        operations.add(PasswordPolicyStateOperationType.GET_REMAINING_GRACE_LOGIN_COUNT);
    }
    /**
     * Returns the seconds until account expiration.
     */
    /** Returns the seconds until account expiration. */
    public void requestSecondsUntilAccountExpiration() {
        operations.add(PasswordPolicyStateOperationType.GET_SECONDS_UNTIL_ACCOUNT_EXPIRATION);
    }
    /**
     * Returns the seconds until authentication failure unlock.
     */
    /** Returns the seconds until authentication failure unlock. */
    public void requestSecondsUntilAuthenticationFailureUnlock() {
        operations
                .add(PasswordPolicyStateOperationType.GET_SECONDS_UNTIL_AUTHENTICATION_FAILURE_UNLOCK);
    }
    /**
     * Returns the seconds until idle lockout.
     */
    /** Returns the seconds until idle lockout. */
    public void requestSecondsUntilIdleLockout() {
        operations.add(PasswordPolicyStateOperationType.GET_SECONDS_UNTIL_IDLE_LOCKOUT);
    }
    /**
     * Returns the seconds until password expiration.
     */
    /** Returns the seconds until password expiration. */
    public void requestSecondsUntilPasswordExpiration() {
        operations.add(PasswordPolicyStateOperationType.GET_SECONDS_UNTIL_PASSWORD_EXPIRATION);
    }
    /**
     * Returns the seconds until password expiration warning.
     */
    /** Returns the seconds until password expiration warning. */
    public void requestSecondsUntilPasswordExpirationWarning() {
        operations
                .add(PasswordPolicyStateOperationType.GET_SECONDS_UNTIL_PASSWORD_EXPIRATION_WARNING);
    }
    /**
     * Returns the seconds until password reset lockout.
     */
    /** Returns the seconds until password reset lockout. */
    public void requestSecondsUntilPasswordResetLockout() {
        operations.add(PasswordPolicyStateOperationType.GET_SECONDS_UNTIL_PASSWORD_RESET_LOCKOUT);
    }
    /**
     * Returns the seconds until required change time.
     */
    /** Returns the seconds until required change time. */
    public void requestSecondsUntilRequiredChangeTime() {
        operations.add(PasswordPolicyStateOperationType.GET_SECONDS_UNTIL_REQUIRED_CHANGE_TIME);
    }
@@ -751,13 +674,11 @@
        return ByteString.valueOfUtf8(formatAsGeneralizedTime(date));
    }
    /** {@inheritDoc} */
    @Override
    public void setTargetUser(String targetUser) {
        this.targetUser = targetUser != null ? targetUser : "";
    }
    /** {@inheritDoc} */
    @Override
    public String toString() {
        final StringBuilder builder = new StringBuilder();
opendj-sdk/opendj-core/src/main/java/com/forgerock/opendj/util/Collections2.java
@@ -12,7 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009-2010 Sun Microsystems, Inc.
 * Portions Copyright 2014-2015 ForgeRock AS.
 * Portions Copyright 2014-2016 ForgeRock AS.
 */
package com.forgerock.opendj.util;
@@ -25,13 +25,10 @@
import org.forgerock.util.Function;
import org.forgerock.util.promise.NeverThrowsException;
/**
 * Additional {@code Collection} based utility methods.
 */
/** Additional {@code Collection} based utility methods. */
public final class Collections2 {
    private static class TransformedCollection<M, N, C extends Collection<M>> extends
            AbstractCollection<N> implements Collection<N> {
        protected final C collection;
        protected final Function<? super M, ? extends N, NeverThrowsException> funcMtoN;
@@ -46,68 +43,57 @@
            this.funcNtoM = funcNtoM;
        }
        /** {@inheritDoc} */
        @Override
        public boolean add(final N e) {
            return collection.add(funcNtoM.apply(e));
        }
        /** {@inheritDoc} */
        @Override
        public void clear() {
            collection.clear();
        }
        /** {@inheritDoc} */
        @Override
        @SuppressWarnings("unchecked")
        public boolean contains(final Object o) {
            return collection.contains(funcNtoM.apply((N) o));
        }
        /** {@inheritDoc} */
        @Override
        public boolean isEmpty() {
            return collection.isEmpty();
        }
        /** {@inheritDoc} */
        @Override
        public Iterator<N> iterator() {
            return Iterators.transformedIterator(collection.iterator(), funcMtoN);
        }
        /** {@inheritDoc} */
        @Override
        @SuppressWarnings("unchecked")
        public boolean remove(final Object o) {
            return collection.remove(funcNtoM.apply((N) o));
        }
        /** {@inheritDoc} */
        @Override
        public int size() {
            return collection.size();
        }
    }
    private static final class TransformedList<M, N> extends
            TransformedCollection<M, N, List<M>> implements List<N> {
        private TransformedList(final List<M> list,
                final Function<? super M, ? extends N, NeverThrowsException> funcMtoN,
                final Function<? super N, ? extends M, NeverThrowsException> funcNtoM) {
            super(list, funcMtoN, funcNtoM);
        }
        /** {@inheritDoc} */
        @Override
        public void add(final int index, final N element) {
            collection.add(index, funcNtoM.apply(element));
        }
        /** {@inheritDoc} */
        @Override
        public boolean addAll(final int index, final Collection<? extends N> c) {
            // We cannot transform c here due to type-safety.
@@ -118,33 +104,28 @@
            return result;
        }
        /** {@inheritDoc} */
        @Override
        public N get(final int index) {
            return funcMtoN.apply(collection.get(index));
        }
        /** {@inheritDoc} */
        @Override
        @SuppressWarnings("unchecked")
        public int indexOf(final Object o) {
            return collection.indexOf(funcNtoM.apply((N) o));
        }
        /** {@inheritDoc} */
        @Override
        @SuppressWarnings("unchecked")
        public int lastIndexOf(final Object o) {
            return collection.lastIndexOf(funcNtoM.apply((N) o));
        }
        /** {@inheritDoc} */
        @Override
        public ListIterator<N> listIterator() {
            return listIterator(0);
        }
        /** {@inheritDoc} */
        @Override
        public ListIterator<N> listIterator(final int index) {
            final ListIterator<M> iterator = collection.listIterator(index);
@@ -198,26 +179,22 @@
            };
        }
        /** {@inheritDoc} */
        @Override
        public N remove(final int index) {
            return funcMtoN.apply(collection.remove(index));
        }
        /** {@inheritDoc} */
        @Override
        public N set(final int index, final N element) {
            final M result = collection.set(index, funcNtoM.apply(element));
            return funcMtoN.apply(result);
        }
        /** {@inheritDoc} */
        @Override
        public List<N> subList(final int fromIndex, final int toIndex) {
            final List<M> subList = collection.subList(fromIndex, toIndex);
            return new TransformedList<>(subList, funcMtoN, funcNtoM);
        }
    }
    /**
@@ -280,5 +257,4 @@
    private Collections2() {
        // Do nothing.
    }
}
opendj-sdk/opendj-core/src/main/java/com/forgerock/opendj/util/SizeLimitInputStream.java
@@ -12,15 +12,14 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2006-2009 Sun Microsystems, Inc.
 * Portions Copyright 2016 ForgeRock AS.
 */
package com.forgerock.opendj.util;
import java.io.IOException;
import java.io.InputStream;
/**
 * An implementation of input stream that enforces an read size limit.
 */
/** An implementation of input stream that enforces an read size limit. */
public class SizeLimitInputStream extends InputStream {
    private int bytesRead;
    private int markBytesRead;
@@ -40,7 +39,6 @@
        this.readLimit = readLimit;
    }
    /** {@inheritDoc} */
    @Override
    public int available() throws IOException {
        final int streamAvail = parentStream.available();
@@ -48,7 +46,6 @@
        return limitedAvail < streamAvail ? limitedAvail : streamAvail;
    }
    /** {@inheritDoc} */
    @Override
    public void close() throws IOException {
        parentStream.close();
@@ -72,20 +69,17 @@
        return readLimit;
    }
    /** {@inheritDoc} */
    @Override
    public synchronized void mark(final int readlimit) {
        parentStream.mark(readlimit);
        markBytesRead = bytesRead;
    }
    /** {@inheritDoc} */
    @Override
    public boolean markSupported() {
        return parentStream.markSupported();
    }
    /** {@inheritDoc} */
    @Override
    public int read() throws IOException {
        if (bytesRead >= readLimit) {
@@ -99,7 +93,6 @@
        return b;
    }
    /** {@inheritDoc} */
    @Override
    public int read(final byte[] b, final int off, int len) throws IOException {
        if (off < 0 || len < 0 || off + len > b.length) {
@@ -125,14 +118,12 @@
        return readLen;
    }
    /** {@inheritDoc} */
    @Override
    public synchronized void reset() throws IOException {
        parentStream.reset();
        bytesRead = markBytesRead;
    }
    /** {@inheritDoc} */
    @Override
    public long skip(long n) throws IOException {
        if (bytesRead + n > readLimit) {
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/io/ASN1OutputStreamWriter.java
@@ -12,7 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2006-2009 Sun Microsystems, Inc.
 * Portions copyright 2012-2015 ForgeRock AS.
 * Portions copyright 2012-2016 ForgeRock AS.
 */
package org.forgerock.opendj.io;
@@ -29,9 +29,7 @@
import com.forgerock.opendj.util.StaticUtils;
/**
 * An ASN1Writer implementation that outputs to an outputstream.
 */
/** An ASN1Writer implementation that outputs to an outputstream. */
final class ASN1OutputStreamWriter extends AbstractASN1Writer {
    /** Initial size of internal buffers. */
    private static final int BUFFER_INIT_SIZE = 32;
@@ -60,7 +58,6 @@
        this.stackDepth = -1;
    }
    /** {@inheritDoc} */
    @Override
    public void close() throws IOException {
        while (stackDepth >= 0) {
@@ -71,13 +68,11 @@
        rootStream.close();
    }
    /** {@inheritDoc} */
    @Override
    public void flush() throws IOException {
        rootStream.flush();
    }
    /** {@inheritDoc} */
    @Override
    public ASN1Writer writeBoolean(final byte type, final boolean booleanValue) throws IOException {
        out.write(type);
@@ -88,7 +83,6 @@
        return this;
    }
    /** {@inheritDoc} */
    @Override
    public ASN1Writer writeEndSequence() throws IOException {
        if (stackDepth < 0) {
@@ -116,19 +110,16 @@
        return this;
    }
    /** {@inheritDoc} */
    @Override
    public ASN1Writer writeEndSet() throws IOException {
        return writeEndSequence();
    }
    /** {@inheritDoc} */
    @Override
    public ASN1Writer writeEnumerated(final byte type, final int intValue) throws IOException {
        return writeInteger(type, intValue);
    }
    /** {@inheritDoc} */
    @Override
    public ASN1Writer writeInteger(final byte type, final int intValue) throws IOException {
        out.write(type);
@@ -161,7 +152,6 @@
        return this;
    }
    /** {@inheritDoc} */
    @Override
    public ASN1Writer writeInteger(final byte type, final long longValue) throws IOException {
        out.write(type);
@@ -236,7 +226,6 @@
        return this;
    }
    /** {@inheritDoc} */
    @Override
    public ASN1Writer writeNull(final byte type) throws IOException {
        out.write(type);
@@ -246,7 +235,6 @@
        return this;
    }
    /** {@inheritDoc} */
    @Override
    public ASN1Writer writeOctetString(final byte type, final byte[] value, final int offset,
            final int length) throws IOException {
@@ -258,7 +246,6 @@
        return this;
    }
    /** {@inheritDoc} */
    @Override
    public ASN1Writer writeOctetString(final byte type, final ByteSequence value)
            throws IOException {
@@ -270,7 +257,6 @@
        return this;
    }
    /** {@inheritDoc} */
    @Override
    public ASN1Writer writeOctetString(final byte type, final String value) throws IOException {
        out.write(type);
@@ -288,7 +274,6 @@
        return this;
    }
    /** {@inheritDoc} */
    @Override
    public ASN1Writer writeStartSequence(final byte type) throws IOException {
        // Write the type in current stream switch to next sub-stream
@@ -310,7 +295,6 @@
        return this;
    }
    /** {@inheritDoc} */
    @Override
    public ASN1Writer writeStartSet(final byte type) throws IOException {
        // From an implementation point of view, a set is equivalent to a
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/AbstractAsynchronousConnection.java
@@ -12,9 +12,8 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009-2010 Sun Microsystems, Inc.
 * Portions Copyright 2011-2014 ForgeRock AS.
 * Portions Copyright 2011-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap;
import org.forgerock.opendj.ldap.requests.AddRequest;
@@ -37,58 +36,47 @@
 * asynchronous methods.
 */
public abstract class AbstractAsynchronousConnection extends AbstractConnection {
    /**
     * Creates a new abstract asynchronous connection.
     */
    /** Creates a new abstract asynchronous connection. */
    protected AbstractAsynchronousConnection() {
        // No implementation required.
    }
    /** {@inheritDoc} */
    @Override
    public Result add(final AddRequest request) throws LdapException {
        return blockingGetOrThrow(addAsync(request));
    }
    /** {@inheritDoc} */
    @Override
    public BindResult bind(final BindRequest request) throws LdapException {
        return blockingGetOrThrow(bindAsync(request));
    }
    /** {@inheritDoc} */
    @Override
    public CompareResult compare(final CompareRequest request) throws LdapException {
        return blockingGetOrThrow(compareAsync(request));
    }
    /** {@inheritDoc} */
    @Override
    public Result delete(final DeleteRequest request) throws LdapException {
        return blockingGetOrThrow(deleteAsync(request));
    }
    /** {@inheritDoc} */
    @Override
    public <R extends ExtendedResult> R extendedRequest(final ExtendedRequest<R> request,
            final IntermediateResponseHandler handler) throws LdapException {
        return blockingGetOrThrow(extendedRequestAsync(request, handler));
    }
    /** {@inheritDoc} */
    @Override
    public Result modify(final ModifyRequest request) throws LdapException {
        return blockingGetOrThrow(modifyAsync(request));
    }
    /** {@inheritDoc} */
    @Override
    public Result modifyDN(final ModifyDNRequest request) throws LdapException {
        return blockingGetOrThrow(modifyDNAsync(request));
    }
    /** {@inheritDoc} */
    @Override
    public Result search(final SearchRequest request, final SearchResultHandler handler) throws LdapException {
        return blockingGetOrThrow(searchAsync(request, handler));
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/AbstractConnection.java
@@ -12,9 +12,8 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009-2010 Sun Microsystems, Inc.
 * Portions Copyright 2011-2014 ForgeRock AS.
 * Portions Copyright 2011-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap;
import java.util.Collection;
@@ -53,7 +52,6 @@
 * interface, to minimize the effort required to implement this interface.
 */
public abstract class AbstractConnection implements Connection {
    private static final class SingleEntryHandler implements SearchResultHandler {
        private volatile SearchResultEntry firstEntry;
        private volatile SearchResultReference firstReference;
@@ -166,9 +164,7 @@
                }
            };
    /**
     * Creates a new abstract connection.
     */
    /** Creates a new abstract connection. */
    protected AbstractConnection() {
        // No implementation required.
    }
@@ -441,5 +437,4 @@
     */
    @Override
    public abstract String toString();
}
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/AbstractConnectionWrapper.java
@@ -12,9 +12,8 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2010 Sun Microsystems, Inc.
 * Portions Copyright 2011-2014 ForgeRock AS.
 * Portions Copyright 2011-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap;
import java.util.Collection;
@@ -50,9 +49,7 @@
 *            The type of wrapped connection.
 */
public abstract class AbstractConnectionWrapper<C extends Connection> implements Connection {
    /**
     * The wrapped connection.
     */
    /** The wrapped connection. */
    protected final C connection;
    /**
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/AbstractFilterVisitor.java
@@ -14,7 +14,6 @@
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions Copyright 2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap;
import java.util.List;
@@ -35,10 +34,7 @@
 *            additional parameter.
 */
public abstract class AbstractFilterVisitor<R, P> implements FilterVisitor<R, P> {
    /**
     * Default constructor.
     */
    /** Default constructor. */
    protected AbstractFilterVisitor() {
        // Nothing to do.
    }
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/AbstractMapEntry.java
@@ -12,7 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009-2010 Sun Microsystems, Inc.
 * Portions copyright 2012-2015 ForgeRock AS.
 * Portions copyright 2012-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap;
@@ -21,9 +21,7 @@
import org.forgerock.util.Reject;
/**
 * Abstract implementation for {@code Map} based entries.
 */
/** Abstract implementation for {@code Map} based entries. */
abstract class AbstractMapEntry extends AbstractEntry {
    private final Map<AttributeDescription, Attribute> attributes;
    private DN name;
@@ -42,7 +40,6 @@
        this.attributes = attributes;
    }
    /** {@inheritDoc} */
    @Override
    public final boolean addAttribute(final Attribute attribute,
            final Collection<? super ByteString> duplicateValues) {
@@ -56,20 +53,17 @@
        }
    }
    /** {@inheritDoc} */
    @Override
    public final Entry clearAttributes() {
        attributes.clear();
        return this;
    }
    /** {@inheritDoc} */
    @Override
    public final Iterable<Attribute> getAllAttributes() {
        return attributes.values();
    }
    /** {@inheritDoc} */
    @Override
    public final Attribute getAttribute(final AttributeDescription attributeDescription) {
        final Attribute attribute = attributes.get(attributeDescription);
@@ -81,19 +75,16 @@
        }
    }
    /** {@inheritDoc} */
    @Override
    public final int getAttributeCount() {
        return attributes.size();
    }
    /** {@inheritDoc} */
    @Override
    public final DN getName() {
        return name;
    }
    /** {@inheritDoc} */
    @Override
    public final boolean removeAttribute(final Attribute attribute,
            final Collection<? super ByteString> missingValues) {
@@ -123,12 +114,10 @@
        }
    }
    /** {@inheritDoc} */
    @Override
    public final Entry setName(final DN dn) {
        Reject.ifNull(dn);
        this.name = dn;
        return this;
    }
}
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/AbstractSynchronousConnection.java
@@ -11,9 +11,8 @@
 * Header, with the fields enclosed by brackets [] replaced by your own identifying
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2012-2014 ForgeRock AS.
 * Copyright 2012-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap;
import org.forgerock.opendj.ldap.requests.AbandonRequest;
@@ -41,10 +40,7 @@
 * the equivalent synchronous methods.
 */
public abstract class AbstractSynchronousConnection extends AbstractConnection {
    /**
     * Creates a new abstract synchronous connection.
     */
    /** Creates a new abstract synchronous connection. */
    protected AbstractSynchronousConnection() {
        // No implementation required.
    }
@@ -154,5 +150,4 @@
    private <R extends Result> LdapPromise<R> thenOnResult(final R result) {
        return newSuccessfulLdapPromise(result);
    }
}
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/ByteString.java
@@ -33,11 +33,8 @@
import com.forgerock.opendj.util.StaticUtils;
/**
 * An immutable sequence of bytes backed by a byte array.
 */
/** An immutable sequence of bytes backed by a byte array. */
public final class ByteString implements ByteSequence {
    /** Singleton empty byte string. */
    private static final ByteString EMPTY = wrap(new byte[0]);
@@ -626,7 +623,6 @@
        return new ByteSequenceReader(this);
    }
    /** {@inheritDoc} */
    @Override
    public byte byteAt(final int index) {
        if (index >= length || index < 0) {
@@ -635,14 +631,12 @@
        return buffer[offset + index];
    }
    /** {@inheritDoc} */
    @Override
    public int compareTo(final byte[] bytes, final int offset, final int length) {
        checkArrayBounds(bytes, offset, length);
        return compareTo(this.buffer, this.offset, this.length, bytes, offset, length);
    }
    /** {@inheritDoc} */
    @Override
    public int compareTo(final ByteSequence o) {
        if (this == o) {
@@ -651,14 +645,12 @@
        return -o.compareTo(buffer, offset, length);
    }
    /** {@inheritDoc} */
    @Override
    public byte[] copyTo(final byte[] bytes) {
        copyTo(bytes, 0);
        return bytes;
    }
    /** {@inheritDoc} */
    @Override
    public byte[] copyTo(final byte[] bytes, final int offset) {
        if (offset < 0) {
@@ -680,7 +672,6 @@
        return builder;
    }
    @Override
    public boolean copyTo(CharBuffer charBuffer, CharsetDecoder decoder) {
        return copyTo(ByteBuffer.wrap(buffer, offset, length), charBuffer, decoder);
@@ -698,14 +689,12 @@
        return !result.isError() && !result.isOverflow();
    }
    /** {@inheritDoc} */
    @Override
    public OutputStream copyTo(final OutputStream stream) throws IOException {
        stream.write(buffer, offset, length);
        return stream;
    }
    /** {@inheritDoc} */
    @Override
    public boolean equals(final byte[] bytes, final int offset, final int length) {
        checkArrayBounds(bytes, offset, length);
@@ -751,13 +740,11 @@
        return length == 0;
    }
    /** {@inheritDoc} */
    @Override
    public int length() {
        return length;
    }
    /** {@inheritDoc} */
    @Override
    public ByteString subSequence(final int start, final int end) {
        if (start < 0 || start > end || end > length) {
@@ -766,16 +753,11 @@
        return new ByteString(buffer, offset + start, end - start);
    }
    /** {@inheritDoc} */
    @Override
    public boolean startsWith(ByteSequence prefix) {
        if (prefix == null || prefix.length() > length) {
            return false;
        }
        return prefix.equals(buffer, 0, prefix.length());
        return prefix != null && prefix.length() <= length && prefix.equals(buffer, 0, prefix.length());
    }
    /** {@inheritDoc} */
    @Override
    public String toBase64String() {
        return Base64.encode(this);
@@ -900,13 +882,11 @@
        return builder.toString();
    }
    /** {@inheritDoc} */
    @Override
    public byte[] toByteArray() {
        return copyTo(new byte[length]);
    }
    /** {@inheritDoc} */
    @Override
    public ByteString toByteString() {
        return this;
@@ -971,7 +951,6 @@
        return v;
    }
    /** {@inheritDoc} */
    @Override
    public String toString() {
        return toString(buffer, offset, length);
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/DereferenceAliasesPolicy.java
@@ -12,8 +12,8 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions Copyright 2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap;
import java.util.Arrays;
@@ -61,10 +61,7 @@
     */
    public static final DereferenceAliasesPolicy FINDING_BASE = register(2, "find");
    /**
     * Dereference aliases both in searching and in locating the base object of
     * a Search operation.
     */
    /** Dereference aliases both in searching and in locating the base object of a Search operation. */
    public static final DereferenceAliasesPolicy ALWAYS = register(3, "always");
    /**
@@ -122,7 +119,6 @@
        this.name = name;
    }
    /** {@inheritDoc} */
    @Override
    public boolean equals(final Object obj) {
        if (this == obj) {
@@ -134,7 +130,6 @@
        }
    }
    /** {@inheritDoc} */
    @Override
    public int hashCode() {
        return intValue;
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/Entries.java
@@ -12,7 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2010 Sun Microsystems, Inc.
 * Portions Copyright 2011-2015 ForgeRock AS.
 * Portions Copyright 2011-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap;
@@ -63,10 +63,7 @@
     * @see Entries#diffEntries(Entry, Entry, DiffOptions)
     */
    public static final class DiffOptions {
        /**
         * Selects which attributes will be compared. By default all user
         * attributes will be compared.
         */
        /** Selects which attributes will be compared. By default all user attributes will be compared. */
        private AttributeFilter attributeFilter = USER_ATTRIBUTES_ONLY_FILTER;
        /**
@@ -188,7 +185,6 @@
        private Entry filter(final Entry entry) {
            return attributeFilter.filteredViewOf(entry);
        }
    }
    private static final class UnmodifiableEntry implements Entry {
@@ -198,20 +194,17 @@
            this.entry = entry;
        }
        /** {@inheritDoc} */
        @Override
        public boolean addAttribute(final Attribute attribute) {
            throw new UnsupportedOperationException();
        }
        /** {@inheritDoc} */
        @Override
        public boolean addAttribute(final Attribute attribute,
                final Collection<? super ByteString> duplicateValues) {
            throw new UnsupportedOperationException();
        }
        /** {@inheritDoc} */
        @Override
        public Entry addAttribute(final String attributeDescription, final Object... values) {
            throw new UnsupportedOperationException();
@@ -233,7 +226,6 @@
            return entry.containsAttribute(attributeDescription, values);
        }
        /** {@inheritDoc} */
        @Override
        public boolean equals(final Object object) {
            return object == this || entry.equals(object);
@@ -251,7 +243,6 @@
                    .getAllAttributes(attributeDescription), UNMODIFIABLE_ATTRIBUTE_FUNCTION));
        }
        /** {@inheritDoc} */
        @Override
        public Iterable<Attribute> getAllAttributes(final String attributeDescription) {
            return Iterables.unmodifiableIterable(Iterables.transformedIterable(entry
@@ -268,7 +259,6 @@
            }
        }
        /** {@inheritDoc} */
        @Override
        public Attribute getAttribute(final String attributeDescription) {
            final Attribute attribute = entry.getAttribute(attributeDescription);
@@ -284,31 +274,26 @@
            return entry.getAttributeCount();
        }
        /** {@inheritDoc} */
        @Override
        public DN getName() {
            return entry.getName();
        }
        /** {@inheritDoc} */
        @Override
        public int hashCode() {
            return entry.hashCode();
        }
        /** {@inheritDoc} */
        @Override
        public AttributeParser parseAttribute(final AttributeDescription attributeDescription) {
            return entry.parseAttribute(attributeDescription);
        }
        /** {@inheritDoc} */
        @Override
        public AttributeParser parseAttribute(final String attributeDescription) {
            return entry.parseAttribute(attributeDescription);
        }
        /** {@inheritDoc} */
        @Override
        public boolean removeAttribute(final Attribute attribute,
                final Collection<? super ByteString> missingValues) {
@@ -320,19 +305,16 @@
            throw new UnsupportedOperationException();
        }
        /** {@inheritDoc} */
        @Override
        public Entry removeAttribute(final String attributeDescription, final Object... values) {
            throw new UnsupportedOperationException();
        }
        /** {@inheritDoc} */
        @Override
        public boolean replaceAttribute(final Attribute attribute) {
            throw new UnsupportedOperationException();
        }
        /** {@inheritDoc} */
        @Override
        public Entry replaceAttribute(final String attributeDescription, final Object... values) {
            throw new UnsupportedOperationException();
@@ -343,18 +325,15 @@
            throw new UnsupportedOperationException();
        }
        /** {@inheritDoc} */
        @Override
        public Entry setName(final String dn) {
            throw new UnsupportedOperationException();
        }
        /** {@inheritDoc} */
        @Override
        public String toString() {
            return entry.toString();
        }
    }
    private static final Comparator<Entry> COMPARATOR = new Comparator<Entry>() {
@@ -591,10 +570,7 @@
            final int cmp = adfrom.compareTo(adto);
            if (cmp == 0) {
                /*
                 * Attribute is in both entries so compute the differences
                 * between the old and new.
                 */
                /* Attribute is in both entries so compute the differences between the old and new. */
                if (options.useReplaceMaxValues > ato.size()) {
                    // This attribute is a candidate for replacing.
                    if (diffAttributeNeedsReplacing(afrom, ato, options)) {
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/GeneralizedTime.java
@@ -11,7 +11,7 @@
 * Header, with the fields enclosed by brackets [] replaced by your own identifying
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2012-2015 ForgeRock AS.
 * Copyright 2012-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap;
@@ -44,7 +44,6 @@
 *      Rules </a>
 */
public final class GeneralizedTime implements Comparable<GeneralizedTime> {
    /** UTC TimeZone is assumed to never change over JVM lifetime. */
    private static final TimeZone TIME_ZONE_UTC_OBJ = TimeZone.getTimeZone("UTC");
@@ -808,7 +807,6 @@
        this.stringValue = stringValue;
    }
    /** {@inheritDoc} */
    @Override
    public int compareTo(final GeneralizedTime o) {
        final Long timeMS1 = getTimeInMillis();
@@ -816,7 +814,6 @@
        return timeMS1.compareTo(timeMS2);
    }
    /** {@inheritDoc} */
    @Override
    public boolean equals(final Object obj) {
        if (this == obj) {
@@ -848,7 +845,6 @@
        return tmpTimeMS;
    }
    /** {@inheritDoc} */
    @Override
    public int hashCode() {
        return ((Long) getTimeInMillis()).hashCode();
@@ -883,7 +879,6 @@
        return (Date) tmpDate.clone();
    }
    /** {@inheritDoc} */
    @Override
    public String toString() {
        String tmpString = stringValue;
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/LDAPUrl.java
@@ -12,7 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2010 Sun Microsystems, Inc.
 * Portions copyright 2012-2015 ForgeRock AS.
 * Portions copyright 2012-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap;
@@ -91,114 +91,70 @@
     */
    private final boolean isSecured;
    /**
     * The host name corresponding to an LDAP URL.
     */
    /** The host name corresponding to an LDAP URL. */
    private final String host;
    /**
     * The port number corresponding to an LDAP URL.
     */
    /** The port number corresponding to an LDAP URL. */
    private final int port;
    /**
     * The distinguished name corresponding to an LDAP URL.
     */
    /** The distinguished name corresponding to an LDAP URL. */
    private final DN name;
    /**
     * The search scope corresponding to an LDAP URL.
     */
    /** The search scope corresponding to an LDAP URL. */
    private final SearchScope scope;
    /**
     * The search filter corresponding to an LDAP URL.
     */
    /** The search filter corresponding to an LDAP URL. */
    private final Filter filter;
    /**
     * The attributes that need to be searched.
     */
    /** The attributes that need to be searched. */
    private final List<String> attributes;
    /**
     * The String value of LDAP URL.
     */
    /** The String value of LDAP URL. */
    private final String urlString;
    /**
     * Normalized ldap URL.
     */
    /** Normalized ldap URL. */
    private String normalizedURL;
    /**
     * The default scheme to be used with LDAP URL.
     */
    /** The default scheme to be used with LDAP URL. */
    private static final String DEFAULT_URL_SCHEME = "ldap";
    /**
     * The SSL-based scheme allowed to be used with LDAP URL.
     */
    /** The SSL-based scheme allowed to be used with LDAP URL. */
    private static final String SSL_URL_SCHEME = "ldaps";
    /**
     * The default host.
     */
    /** The default host. */
    private static final String DEFAULT_HOST = "localhost";
    /**
     * The default non-SSL port.
     */
    /** The default non-SSL port. */
    private static final int DEFAULT_PORT = 389;
    /**
     * The default SSL port.
     */
    /** The default SSL port. */
    private static final int DEFAULT_SSL_PORT = 636;
    /**
     * The default filter.
     */
    /** The default filter. */
    private static final Filter DEFAULT_FILTER = Filter.objectClassPresent();
    /**
     * The default search scope.
     */
    /** The default search scope. */
    private static final SearchScope DEFAULT_SCOPE = SearchScope.BASE_OBJECT;
    /**
     * The default distinguished name.
     */
    /** The default distinguished name. */
    private static final DN DEFAULT_DN = DN.rootDN();
    /**
     * The % encoding character.
     */
    /** The % encoding character. */
    private static final char PERCENT_ENCODING_CHAR = '%';
    /**
     * The ? character.
     */
    /** The ? character. */
    private static final char QUESTION_CHAR = '?';
    /**
     * The slash (/) character.
     */
    /** The slash (/) character. */
    private static final char SLASH_CHAR = '/';
    /**
     * The comma (,) character.
     */
    /** The comma (,) character. */
    private static final char COMMA_CHAR = ',';
    /**
     * The colon (:) character.
     */
    /** The colon (:) character. */
    private static final char COLON_CHAR = ':';
    /**
     * Set containing characters that do not need to be encoded.
     */
    /** Set containing characters that do not need to be encoded. */
    private static final Set<Character> VALID_CHARS = new HashSet<>();
    static {
@@ -617,7 +573,6 @@
        return request;
    }
    /** {@inheritDoc} */
    @Override
    public boolean equals(final Object o) {
        if (o == this) {
@@ -694,7 +649,6 @@
        return scope;
    }
    /** {@inheritDoc} */
    @Override
    public int hashCode() {
        final String s = toNormalizedString();
@@ -712,7 +666,6 @@
        return isSecured;
    }
    /** {@inheritDoc} */
    @Override
    public String toString() {
        return urlString;
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/LinkedAttribute.java
@@ -12,9 +12,8 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009-2010 Sun Microsystems, Inc.
 * Portions copyright 2012-2015 ForgeRock AS.
 * Portions copyright 2012-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap;
import java.util.Collection;
@@ -44,7 +43,6 @@
public final class LinkedAttribute extends AbstractAttribute {
    private static abstract class Impl {
        abstract boolean add(LinkedAttribute attribute, ByteString value);
        abstract void clear(LinkedAttribute attribute);
@@ -75,7 +73,6 @@
    }
    private static final class MultiValueImpl extends Impl {
        @Override
        boolean add(final LinkedAttribute attribute, final ByteString value) {
            final ByteString normalizedValue = normalizeValue(attribute, value);
@@ -218,7 +215,6 @@
    }
    private static final class SingleValueImpl extends Impl {
        @Override
        boolean add(final LinkedAttribute attribute, final ByteString value) {
            final ByteString normalizedValue = normalizeValue(attribute, value);
@@ -348,7 +344,6 @@
    }
    private static final class ZeroValueImpl extends Impl {
        @Override
        boolean add(final LinkedAttribute attribute, final ByteString value) {
            attribute.singleValue = value;
@@ -423,12 +418,9 @@
        int size(final LinkedAttribute attribute) {
            return 0;
        }
    }
    /**
     * An attribute factory which can be used to create new linked attributes.
     */
    /** An attribute factory which can be used to create new linked attributes. */
    public static final AttributeFactory FACTORY = new AttributeFactory() {
        @Override
        public Attribute newAttribute(final AttributeDescription attributeDescription) {
@@ -636,59 +628,50 @@
        add(values);
    }
    /** {@inheritDoc} */
    @Override
    public boolean add(final ByteString value) {
        Reject.ifNull(value);
        return pimpl.add(this, value);
    }
    /** {@inheritDoc} */
    @Override
    public void clear() {
        pimpl.clear(this);
    }
    /** {@inheritDoc} */
    @Override
    public boolean contains(final Object value) {
        Reject.ifNull(value);
        return pimpl.contains(this, ByteString.valueOfObject(value));
    }
    /** {@inheritDoc} */
    @Override
    public boolean containsAll(final Collection<?> values) {
        Reject.ifNull(values);
        return pimpl.containsAll(this, values);
    }
    /** {@inheritDoc} */
    @Override
    public ByteString firstValue() {
        return pimpl.firstValue(this);
    }
    /** {@inheritDoc} */
    @Override
    public AttributeDescription getAttributeDescription() {
        return attributeDescription;
    }
    /** {@inheritDoc} */
    @Override
    public Iterator<ByteString> iterator() {
        return pimpl.iterator(this);
    }
    /** {@inheritDoc} */
    @Override
    public boolean remove(final Object value) {
        Reject.ifNull(value);
        return pimpl.remove(this, ByteString.valueOfObject(value));
    }
    /** {@inheritDoc} */
    @Override
    public <T> boolean retainAll(final Collection<T> values,
            final Collection<? super T> missingValues) {
@@ -696,7 +679,6 @@
        return pimpl.retainAll(this, values, missingValues);
    }
    /** {@inheritDoc} */
    @Override
    public int size() {
        return pimpl.size(this);
@@ -709,5 +691,4 @@
        }
        return normalizedSingleValue;
    }
}
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/Modification.java
@@ -12,15 +12,13 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009-2010 Sun Microsystems, Inc.
 * Portions Copyright 2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap;
import org.forgerock.util.Reject;
/**
 * A modification to be performed on an entry during a Modify operation.
 */
/** A modification to be performed on an entry during a Modify operation. */
public final class Modification {
    private final ModificationType modificationType;
    private final Attribute attribute;
@@ -66,7 +64,6 @@
        return modificationType;
    }
    /** {@inheritDoc} */
    @Override
    public String toString() {
        final StringBuilder builder = new StringBuilder();
@@ -86,5 +83,4 @@
        builder.append("})");
        return builder.toString();
    }
}
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/ModificationType.java
@@ -12,6 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions Copyright 2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap;
@@ -29,7 +30,6 @@
 *      Directory Access Protocol (LDAP) Modify-Increment Extension </a>
 */
public final class ModificationType {
    /**
     * Contains equivalent values for the ModificationType values.
     * This allows easily using ModificationType values with switch statements.
@@ -145,7 +145,6 @@
        this.modificationTypeEnum = modificationTypeEnum;
    }
    /** {@inheritDoc} */
    @Override
    public boolean equals(final Object obj) {
        if (this == obj) {
@@ -157,7 +156,6 @@
        }
    }
    /** {@inheritDoc} */
    @Override
    public int hashCode() {
        return intValue;
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/RequestHandlerFactoryAdapter.java
@@ -11,9 +11,8 @@
 * Header, with the fields enclosed by brackets [] replaced by your own identifying
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2011-2015 ForgeRock AS.
 * Copyright 2011-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap;
import static com.forgerock.opendj.ldap.CoreMessages.INFO_CANCELED_BY_ABANDON_REQUEST;
@@ -62,16 +61,10 @@
 *            The type of client context.
 */
final class RequestHandlerFactoryAdapter<C> implements ServerConnectionFactory<C, Integer> {
    /**
     * Request context implementation.
     */
    /** Request context implementation. */
    private static class RequestContextImpl<S extends Result, H extends LdapResultHandler<S>>
            implements RequestContext, LdapResultHandler<S> {
        /**
         * Adapter class which invokes cancel result handlers with correct
         * result type.
         */
        /** Adapter class which invokes cancel result handlers with correct result type. */
        private static final class ExtendedResultHandlerHolder<R extends ExtendedResult> {
            private final ExtendedRequest<R> request;
            private final LdapResultHandler<R> resultHandler;
@@ -136,7 +129,6 @@
            this.isCancelSupported = isCancelSupported;
        }
        /** {@inheritDoc} */
        @Override
        public void addCancelRequestListener(final CancelRequestListener listener) {
            Reject.ifNull(listener);
@@ -157,10 +149,7 @@
                case TOO_LATE:
                case RESULT_SENT:
                case CANCELLED:
                    /*
                     * No point in registering the callback since the request
                     * can never be cancelled now.
                     */
                    /* No point in registering the callback since the request can never be cancelled now. */
                    break;
                }
            }
@@ -170,7 +159,6 @@
            }
        }
        /** {@inheritDoc} */
        @Override
        public void checkIfCancelled(final boolean signalTooLate) throws CancelledResultException {
            synchronized (stateLock) {
@@ -183,10 +171,7 @@
                    }
                    break;
                case CANCEL_REQUESTED:
                    /*
                     * Don't change state: let the handler ack the cancellation
                     * request.
                     */
                    /* Don't change state: let the handler ack the cancellation request. */
                    throw (CancelledResultException) newLdapException(ResultCode.CANCELLED,
                            cancelRequestReason.toString());
                case TOO_LATE:
@@ -194,22 +179,17 @@
                    break;
                case RESULT_SENT:
                case CANCELLED:
                    /*
                     * This should not happen - could throw an illegal state
                     * exception?
                     */
                    /* This should not happen - could throw an illegal state exception? */
                    break;
                }
            }
        }
        /** {@inheritDoc} */
        @Override
        public int getMessageID() {
            return messageID;
        }
        /** {@inheritDoc} */
        @Override
        public void handleException(final LdapException error) {
            if (clientConnection.removePendingRequest(this)) {
@@ -225,7 +205,6 @@
            }
        }
        /** {@inheritDoc} */
        @Override
        public void handleResult(final S result) {
            if (clientConnection.removePendingRequest(this)) {
@@ -241,7 +220,6 @@
            }
        }
        /** {@inheritDoc} */
        @Override
        public void removeCancelRequestListener(final CancelRequestListener listener) {
            Reject.ifNull(listener);
@@ -287,9 +265,7 @@
                    this.sendResult &= sendResult;
                    break;
                case CANCEL_REQUESTED:
                    /*
                     * Cancel already request so listeners already invoked.
                     */
                    /* Cancel already request so listeners already invoked. */
                    if (cancelResultHandler != null) {
                        if (cancelResultHandlers == null) {
                            cancelResultHandlers = new LinkedList<>();
@@ -300,10 +276,7 @@
                    break;
                case TOO_LATE:
                case RESULT_SENT:
                    /*
                     * Cannot cancel, so invoke result handler immediately
                     * outside of lock.
                     */
                    /* Cannot cancel, so invoke result handler immediately outside of lock. */
                    if (cancelResultHandler != null) {
                        invokeResultHandler = true;
                        resultHandlerIsSuccess = false;
@@ -370,10 +343,7 @@
                    }
                    break;
                case CANCEL_REQUESTED:
                    /*
                     * Switch to appropriate final state and invoke any cancel
                     * request handlers.
                     */
                    /* Switch to appropriate final state and invoke any cancel request handlers. */
                    if (!result.getResultCode().equals(ResultCode.CANCELLED)) {
                        state = RequestState.RESULT_SENT;
                    } else {
@@ -386,10 +356,7 @@
                    break;
                case RESULT_SENT:
                case CANCELLED:
                    /*
                     * This should not happen - could throw an illegal state
                     * exception?
                     */
                    /* This should not happen - could throw an illegal state exception? */
                    maySendResult = false; // Prevent sending multiple results.
                    break;
                }
@@ -410,9 +377,7 @@
        }
    }
    /**
     * Search request context implementation.
     */
    /** Search request context implementation. */
    private static final class SearchRequestContextImpl extends RequestContextImpl<Result, LdapResultHandler<Result>>
        implements SearchResultHandler {
@@ -425,13 +390,11 @@
            this.entryHandler = entryHandler;
        }
        /** {@inheritDoc} */
        @Override
        public boolean handleEntry(final SearchResultEntry entry) {
            return entryHandler.handleEntry(entry);
        }
        /** {@inheritDoc} */
        @Override
        public boolean handleReference(final SearchResultReference reference) {
            return entryHandler.handleReference(reference);
@@ -447,7 +410,6 @@
            this.requestHandler = requestHandler;
        }
        /** {@inheritDoc} */
        @Override
        public void handleAbandon(final Integer messageID, final AbandonRequest request) {
            final RequestContextImpl<?, ?> abandonedRequest =
@@ -459,7 +421,6 @@
            }
        }
        /** {@inheritDoc} */
        @Override
        public void handleAdd(final Integer messageID, final AddRequest request,
                final IntermediateResponseHandler intermediateResponseHandler,
@@ -472,7 +433,6 @@
            }
        }
        /** {@inheritDoc} */
        @Override
        public void handleBind(final Integer messageID, final int version,
                final BindRequest request,
@@ -486,7 +446,6 @@
            }
        }
        /** {@inheritDoc} */
        @Override
        public void handleCompare(final Integer messageID, final CompareRequest request,
                final IntermediateResponseHandler intermediateResponseHandler,
@@ -499,28 +458,24 @@
            }
        }
        /** {@inheritDoc} */
        @Override
        public void handleConnectionClosed(final Integer messageID, final UnbindRequest request) {
            final LocalizableMessage cancelReason = INFO_CANCELED_BY_CLIENT_DISCONNECT.get();
            doClose(cancelReason);
        }
        /** {@inheritDoc} */
        @Override
        public void handleConnectionDisconnected(final ResultCode resultCode, final String message) {
            final LocalizableMessage cancelReason = INFO_CANCELED_BY_SERVER_DISCONNECT.get();
            doClose(cancelReason);
        }
        /** {@inheritDoc} */
        @Override
        public void handleConnectionError(final Throwable error) {
            final LocalizableMessage cancelReason = INFO_CANCELED_BY_CLIENT_ERROR.get();
            doClose(cancelReason);
        }
        /** {@inheritDoc} */
        @Override
        public void handleDelete(final Integer messageID, final DeleteRequest request,
                final IntermediateResponseHandler intermediateResponseHandler,
@@ -533,7 +488,6 @@
            }
        }
        /** {@inheritDoc} */
        @Override
        public <R extends ExtendedResult> void handleExtendedRequest(final Integer messageID,
                final ExtendedRequest<R> request,
@@ -569,10 +523,7 @@
                                INFO_CANCELED_BY_CANCEL_REQUEST.get(messageID);
                        cancelledRequest.cancel(cancelReason, request, requestContext, true);
                    } else {
                        /*
                         * Couldn't find the request. Invoke on context in order
                         * to remove pending request.
                         */
                        /* Couldn't find the request. Invoke on context in order to remove pending request. */
                        requestContext.handleException(newLdapException(ResultCode.NO_SUCH_OPERATION));
                    }
                }
@@ -589,7 +540,6 @@
            }
        }
        /** {@inheritDoc} */
        @Override
        public void handleModify(final Integer messageID, final ModifyRequest request,
                final IntermediateResponseHandler intermediateResponseHandler,
@@ -602,7 +552,6 @@
            }
        }
        /** {@inheritDoc} */
        @Override
        public void handleModifyDN(final Integer messageID, final ModifyDNRequest request,
                final IntermediateResponseHandler intermediateResponseHandler,
@@ -615,7 +564,6 @@
            }
        }
        /** {@inheritDoc} */
        @Override
        public void handleSearch(final Integer messageID, final SearchRequest request,
            final IntermediateResponseHandler intermediateResponseHandler, final SearchResultHandler entryHandler,
@@ -698,7 +646,6 @@
        private boolean removePendingRequest(final RequestContextImpl<?, ?> requestContext) {
            return pendingRequests.remove(requestContext.getMessageID()) != null;
        }
    }
    /**
@@ -728,10 +675,8 @@
        this.factory = factory;
    }
    /** {@inheritDoc} */
    @Override
    public ServerConnection<Integer> handleAccept(final C clientContext) throws LdapException {
        return adaptRequestHandler(factory.handleAccept(clientContext));
    }
}
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/ResultCode.java
@@ -12,7 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions copyright 2013-2015 ForgeRock AS.
 * Portions copyright 2013-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap;
@@ -38,7 +38,6 @@
 *      Lightweight Directory Access Protocol (LDAP): The Protocol </a>
 */
public final class ResultCode {
    /**
     * Contains equivalent values for the ResultCode values.
     * This allows easily using ResultCode values with switch statements.
@@ -923,7 +922,6 @@
        this.resultCodeEnum = resultCodeEnum;
    }
    /** {@inheritDoc} */
    @Override
    public boolean equals(final Object obj) {
        if (this == obj) {
@@ -944,7 +942,6 @@
        return name;
    }
    /** {@inheritDoc} */
    @Override
    public int hashCode() {
        return intValue;
@@ -1000,5 +997,4 @@
    public String toString() {
        return name.toString();
    }
}
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/SearchScope.java
@@ -12,7 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions Copyright 2013 ForgeRock AS.
 * Portions Copyright 2013-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap;
@@ -32,7 +32,6 @@
 *      Scope for LDAP </a>
 */
public final class SearchScope {
    /**
     * Contains equivalent values for the SearchScope values.
     * This allows easily using SearchScope values with switch statements.
@@ -57,21 +56,13 @@
    private static final List<SearchScope> IMMUTABLE_ELEMENTS = Collections.unmodifiableList(Arrays
            .asList(ELEMENTS));
    /**
     * The scope is constrained to the search base entry.
     */
    /** The scope is constrained to the search base entry. */
    public static final SearchScope BASE_OBJECT = register(0, "base", Enum.BASE_OBJECT);
    /**
     * The scope is constrained to the immediate subordinates of the search base
     * entry.
     */
    /** The scope is constrained to the immediate subordinates of the search base entry. */
    public static final SearchScope SINGLE_LEVEL = register(1, "one", Enum.SINGLE_LEVEL);
    /**
     * The scope is constrained to the search base entry and to all its
     * subordinates.
     */
    /** The scope is constrained to the search base entry and to all its subordinates. */
    public static final SearchScope WHOLE_SUBTREE = register(2, "sub", Enum.WHOLE_SUBTREE);
    /**
@@ -164,7 +155,6 @@
        this.searchScopeEnum = searchScopeEnum;
    }
    /** {@inheritDoc} */
    @Override
    public boolean equals(final Object obj) {
        if (this == obj) {
@@ -176,7 +166,6 @@
        }
    }
    /** {@inheritDoc} */
    @Override
    public int hashCode() {
        return intValue;
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/ADNotificationRequestControl.java
@@ -11,7 +11,7 @@
 * Header, with the fields enclosed by brackets [] replaced by your own identifying
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2013 ForgeRock AS.
 * Copyright 2013-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.controls;
@@ -125,31 +125,26 @@
        return new ADNotificationRequestControl(isCritical);
    }
    /** {@inheritDoc} */
    @Override
    public String getOID() {
        return OID;
    }
    /** {@inheritDoc} */
    @Override
    public ByteString getValue() {
        return null;
    }
    /** {@inheritDoc} */
    @Override
    public boolean hasValue() {
        return false;
    }
    /** {@inheritDoc} */
    @Override
    public boolean isCritical() {
        return isCritical;
    }
    /** {@inheritDoc} */
    @Override
    public String toString() {
        final StringBuilder builder = new StringBuilder();
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/EntryChangeNotificationResponseControl.java
@@ -82,17 +82,11 @@
 *      - Persistent Search: A Simple LDAP Change Notification Mechanism </a>
 */
public final class EntryChangeNotificationResponseControl implements Control {
    private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
    /**
     * The OID for the entry change notification response control.
     */
    /** The OID for the entry change notification response control. */
    public static final String OID = "2.16.840.1.113730.3.4.7";
    /**
     * A decoder which can be used for decoding the entry change notification
     * response control.
     */
    /** A decoder which can be used for decoding the entry change notification response control. */
    public static final ControlDecoder<EntryChangeNotificationResponseControl> DECODER =
            new ControlDecoder<EntryChangeNotificationResponseControl>() {
@@ -281,7 +275,6 @@
        return changeType;
    }
    /** {@inheritDoc} */
    @Override
    public String getOID() {
        return OID;
@@ -298,7 +291,6 @@
        return previousName;
    }
    /** {@inheritDoc} */
    @Override
    public ByteString getValue() {
        final ByteStringBuilder buffer = new ByteStringBuilder();
@@ -322,19 +314,16 @@
        }
    }
    /** {@inheritDoc} */
    @Override
    public boolean hasValue() {
        return true;
    }
    /** {@inheritDoc} */
    @Override
    public boolean isCritical() {
        return isCritical;
    }
    /** {@inheritDoc} */
    @Override
    public String toString() {
        final StringBuilder builder = new StringBuilder();
@@ -352,5 +341,4 @@
        builder.append(")");
        return builder.toString();
    }
}
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/PasswordPolicyErrorType.java
@@ -12,6 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2010 Sun Microsystems, Inc.
 * Portions Copyright 2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.controls;
@@ -27,15 +28,10 @@
 *      </a>
 */
public enum PasswordPolicyErrorType {
    /**
     * Indicates that the password has expired and must be reset.
     */
    /** Indicates that the password has expired and must be reset. */
    PASSWORD_EXPIRED(0, "passwordExpired"),
    /**
     * Indicates that the user's account has been locked.
     */
    /** Indicates that the user's account has been locked. */
    ACCOUNT_LOCKED(1, "accountLocked"),
    /**
@@ -44,37 +40,22 @@
     */
    CHANGE_AFTER_RESET(2, "changeAfterReset"),
    /**
     * Indicates that a user is restricted from changing her password.
     */
    /** Indicates that a user is restricted from changing her password. */
    PASSWORD_MOD_NOT_ALLOWED(3, "passwordModNotAllowed"),
    /**
     * Indicates that the old password must be supplied in order to modify the
     * password.
     */
    /** Indicates that the old password must be supplied in order to modify the password. */
    MUST_SUPPLY_OLD_PASSWORD(4, "mustSupplyOldPassword"),
    /**
     * Indicates that a password doesn't pass quality checking.
     */
    /** Indicates that a password doesn't pass quality checking. */
    INSUFFICIENT_PASSWORD_QUALITY(5, "insufficientPasswordQuality"),
    /**
     * Indicates that a password is not long enough.
     */
    /** Indicates that a password is not long enough. */
    PASSWORD_TOO_SHORT(6, "passwordTooShort"),
    /**
     * Indicates that the age of the password to be modified is not yet old
     * enough.
     */
    /** Indicates that the age of the password to be modified is not yet old enough. */
    PASSWORD_TOO_YOUNG(7, "passwordTooYoung"),
    /**
     * Indicates that a password has already been used and the user must choose
     * a different one.
     */
    /** Indicates that a password has already been used and the user must choose a different one. */
    PASSWORD_IN_HISTORY(8, "passwordInHistory");
    private final int intValue;
@@ -86,7 +67,6 @@
        this.name = name;
    }
    /** {@inheritDoc} */
    @Override
    public String toString() {
        return name;
@@ -100,5 +80,4 @@
    int intValue() {
        return intValue;
    }
}
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/PasswordPolicyWarningType.java
@@ -12,6 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2010 Sun Microsystems, Inc.
 * Portions Copyright 2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.controls;
@@ -30,9 +31,7 @@
 *      </a>
 */
public enum PasswordPolicyWarningType {
    /**
     * Indicates the number of seconds before a password will expire.
     */
    /** Indicates the number of seconds before a password will expire. */
    TIME_BEFORE_EXPIRATION(0, "timeBeforeExpiration"),
    /**
@@ -50,7 +49,6 @@
        this.name = name;
    }
    /** {@inheritDoc} */
    @Override
    public String toString() {
        return name;
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/PersistentSearchChangeType.java
@@ -12,7 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2010 Sun Microsystems, Inc.
 * Portions copyright 2013-2015 ForgeRock AS.
 * Portions copyright 2013-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.controls;
@@ -28,27 +28,13 @@
 *      - Persistent Search: A Simple LDAP Change Notification Mechanism </a>
 */
public enum PersistentSearchChangeType {
    /**
     * Indicates that an Add operation triggered the entry change notification.
     */
    /** Indicates that an Add operation triggered the entry change notification. */
    ADD(1, "add"),
    /**
     * Indicates that an Delete operation triggered the entry change
     * notification.
     */
    /** Indicates that an Delete operation triggered the entry change notification. */
    DELETE(2, "delete"),
    /**
     * Indicates that an Modify operation triggered the entry change
     * notification.
     */
    /** Indicates that an Modify operation triggered the entry change notification. */
    MODIFY(4, "modify"),
    /**
     * Indicates that an Modify DN operation triggered the entry change
     * notification.
     */
    /** Indicates that an Modify DN operation triggered the entry change notification. */
    MODIFY_DN(8, "modifyDN");
    private final String name;
@@ -59,7 +45,6 @@
        this.intValue = intValue;
    }
    /** {@inheritDoc} */
    @Override
    public String toString() {
        return name;
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/AbstractApproximateMatchingRuleImpl.java
@@ -11,7 +11,7 @@
 * Header, with the fields enclosed by brackets [] replaced by your own identifying
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2014-2015 ForgeRock AS.
 * Copyright 2014-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -29,7 +29,6 @@
 * values in byte order.
 */
abstract class AbstractApproximateMatchingRuleImpl extends AbstractMatchingRuleImpl {
    private final Indexer indexer;
    AbstractApproximateMatchingRuleImpl(String indexID) {
@@ -42,7 +41,6 @@
        return named(indexer.getIndexID(), normalizeAttributeValue(schema, assertionValue));
    }
    /** {@inheritDoc} */
    @Override
    public final Collection<? extends Indexer> createIndexers(IndexingOptions options) {
        return Collections.singleton(indexer);
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/AbstractEqualityMatchingRuleImpl.java
@@ -11,7 +11,7 @@
 * Header, with the fields enclosed by brackets [] replaced by your own identifying
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2014-2015 ForgeRock AS.
 * Copyright 2014-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -42,7 +42,6 @@
        return defaultAssertion(normalizeAttributeValue(schema, assertionValue));
    }
    /** {@inheritDoc} */
    @Override
    public Collection<? extends Indexer> createIndexers(IndexingOptions options) {
        return Collections.singleton(indexer);
@@ -51,5 +50,4 @@
    Assertion defaultAssertion(final ByteSequence normalizedAssertionValue) {
        return named(indexer.getIndexID(), normalizedAssertionValue);
    }
}
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/AbstractOrderingMatchingRuleImpl.java
@@ -12,7 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions copyright 2014-2015 ForgeRock AS.
 * Portions copyright 2014-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -44,7 +44,6 @@
        this.indexer = new DefaultIndexer(indexId);
    }
    /** {@inheritDoc} */
    @Override
    public final Assertion getAssertion(final Schema schema, final ByteSequence value)
            throws DecodeException {
@@ -63,7 +62,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    public final Assertion getGreaterOrEqualAssertion(final Schema schema, final ByteSequence value)
            throws DecodeException {
@@ -82,7 +80,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    public final Assertion getLessOrEqualAssertion(final Schema schema, final ByteSequence value)
            throws DecodeException {
@@ -101,10 +98,8 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    public final Collection<? extends Indexer> createIndexers(IndexingOptions options) {
        return Collections.singleton(indexer);
    }
}
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/CertificateSyntaxImpl.java
@@ -13,8 +13,8 @@
 *
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions Copyright 2014 Manuel Gaupp
 * Portions Copyright 2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
import java.io.IOException;
@@ -38,44 +38,36 @@
import org.forgerock.opendj.ldap.ByteSequence;
import org.forgerock.opendj.ldap.DecodeException;
/**
 * This class implements the certificate attribute syntax. It is restricted to
 * accept only X.509 certificates.
 */
final class CertificateSyntaxImpl extends AbstractSyntaxImpl {
    /** {@inheritDoc} */
    @Override
    public String getEqualityMatchingRule() {
        return EMR_CERTIFICATE_EXACT_OID;
    }
    /** {@inheritDoc} */
    @Override
    public String getName() {
        return SYNTAX_CERTIFICATE_NAME;
    }
    /** {@inheritDoc} */
    @Override
    public String getOrderingMatchingRule() {
        return OMR_OCTET_STRING_OID;
    }
    /** {@inheritDoc} */
    @Override
    public boolean isBEREncodingRequired() {
        return true;
    }
    /** {@inheritDoc} */
    @Override
    public boolean isHumanReadable() {
        return false;
    }
    /** {@inheritDoc} */
    @Override
    public boolean valueIsAcceptable(final Schema schema, final ByteSequence value,
            final LocalizableMessageBuilder invalidReason) {
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/CollationMatchingRulesImpl.java
@@ -11,7 +11,7 @@
 * Header, with the fields enclosed by brackets [] replaced by your own identifying
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2014-2015 ForgeRock AS.
 * Copyright 2014-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -44,7 +44,6 @@
 * ordering rules) and a substring one (for substring rule).
 */
final class CollationMatchingRulesImpl {
    private static final String INDEX_ID_SHARED = "shared";
    private static final String INDEX_ID_SUBSTRING = "substring";
@@ -118,9 +117,7 @@
        return new CollationGreaterThanOrEqualToMatchingRuleImpl(locale);
    }
    /**
     * Defines the base for collation matching rules.
     */
    /** Defines the base for collation matching rules. */
    private static abstract class AbstractCollationMatchingRuleImpl extends AbstractMatchingRuleImpl {
        private final Locale locale;
        final Collator collator;
@@ -172,13 +169,11 @@
            return builder.toString();
        }
        /** {@inheritDoc} */
        @Override
        public Collection<? extends Indexer> createIndexers(IndexingOptions options) {
            return Collections.singletonList(indexer);
        }
        /** {@inheritDoc} */
        @Override
        public ByteString normalizeAttributeValue(final Schema schema, final ByteSequence value)
                throws DecodeException {
@@ -192,11 +187,8 @@
        }
    }
    /**
     * Defines the collation equality matching rule.
     */
    /** Defines the collation equality matching rule. */
    private static final class CollationEqualityMatchingRuleImpl extends AbstractCollationMatchingRuleImpl {
        /**
         * Creates the matching rule with the provided locale.
         *
@@ -212,14 +204,10 @@
                throws DecodeException {
            return named(indexName, normalizeAttributeValue(schema, assertionValue));
        }
    }
    /**
     * Defines the collation substring matching rule.
     */
    /** Defines the collation substring matching rule. */
    private static final class CollationSubstringMatchingRuleImpl extends AbstractCollationMatchingRuleImpl {
        private final AbstractSubstringMatchingRuleImpl substringMatchingRule;
        /**
@@ -245,14 +233,12 @@
            return substringMatchingRule.getAssertion(schema, assertionValue);
        }
        /** {@inheritDoc} */
        @Override
        public Assertion getSubstringAssertion(Schema schema, ByteSequence subInitial,
                List<? extends ByteSequence> subAnyElements, ByteSequence subFinal) throws DecodeException {
            return substringMatchingRule.getSubstringAssertion(schema, subInitial, subAnyElements, subFinal);
        }
        /** {@inheritDoc} */
        @Override
        public final Collection<? extends Indexer> createIndexers(IndexingOptions options) {
            final Collection<Indexer> indexers = new ArrayList<>(substringMatchingRule.createIndexers(options));
@@ -261,11 +247,8 @@
        }
    }
    /**
     * Defines the collation ordering matching rule.
     */
    /** Defines the collation ordering matching rule. */
    private static abstract class CollationOrderingMatchingRuleImpl extends AbstractCollationMatchingRuleImpl {
        final AbstractOrderingMatchingRuleImpl orderingMatchingRule;
        /**
@@ -286,48 +269,36 @@
        }
    }
    /**
     * Defines the collation less than matching rule.
     */
    /** Defines the collation less than matching rule. */
    private static final class CollationLessThanMatchingRuleImpl extends CollationOrderingMatchingRuleImpl {
        CollationLessThanMatchingRuleImpl(Locale locale) {
            super(locale);
        }
        /** {@inheritDoc} */
        @Override
        public Assertion getAssertion(Schema schema, ByteSequence assertionValue) throws DecodeException {
            return orderingMatchingRule.getAssertion(schema, assertionValue);
        }
    }
    /**
     * Defines the collation less than or equal matching rule.
     */
    /** Defines the collation less than or equal matching rule. */
    private static final class CollationLessThanOrEqualToMatchingRuleImpl extends CollationOrderingMatchingRuleImpl {
        CollationLessThanOrEqualToMatchingRuleImpl(Locale locale) {
            super(locale);
        }
        /** {@inheritDoc} */
        @Override
        public Assertion getAssertion(Schema schema, ByteSequence assertionValue) throws DecodeException {
            return orderingMatchingRule.getLessOrEqualAssertion(schema, assertionValue);
        }
    }
    /**
     * Defines the collation greater than matching rule.
     */
    /** Defines the collation greater than matching rule. */
    private static final class CollationGreaterThanMatchingRuleImpl extends CollationOrderingMatchingRuleImpl {
        CollationGreaterThanMatchingRuleImpl(Locale locale) {
            super(locale);
        }
        /** {@inheritDoc} */
        @Override
        public Assertion getAssertion(Schema schema, ByteSequence assertionValue)
                throws DecodeException {
@@ -347,17 +318,13 @@
        }
    }
    /**
     * Defines the collation greater than or equal matching rule.
     */
    /** Defines the collation greater than or equal matching rule. */
    private static final class CollationGreaterThanOrEqualToMatchingRuleImpl
        extends CollationOrderingMatchingRuleImpl {
        CollationGreaterThanOrEqualToMatchingRuleImpl(Locale locale) {
            super(locale);
        }
        /** {@inheritDoc} */
        @Override
        public Assertion getAssertion(Schema schema, ByteSequence assertionValue) throws DecodeException {
            return orderingMatchingRule.getGreaterOrEqualAssertion(schema, assertionValue);
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/KeywordEqualityMatchingRuleImpl.java
@@ -118,7 +118,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    public Collection<? extends Indexer> createIndexers(IndexingOptions options) {
        return Collections.emptySet();
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/SchemaElement.java
@@ -12,9 +12,8 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions copyright 2011-2015 ForgeRock AS.
 * Portions copyright 2011-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
import static org.forgerock.opendj.ldap.schema.SchemaUtils.unmodifiableCopyOfExtraProperties;
@@ -187,9 +186,7 @@
        }
    }
    /**
     * Lazily created string representation.
     */
    /** Lazily created string representation. */
    private String definition;
    /** The description for this definition. */
@@ -218,7 +215,6 @@
        this.definition = definition;
    }
    /** {@inheritDoc} */
    @Override
    public abstract boolean equals(Object obj);
@@ -244,7 +240,6 @@
        return extraProperties;
    }
    /** {@inheritDoc} */
    @Override
    public abstract int hashCode();
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/spi/SearchResultLdapPromiseImpl.java
@@ -12,9 +12,8 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009-2010 Sun Microsystems, Inc.
 * Portions copyright 2011-2015 ForgeRock AS.
 * Portions copyright 2011-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.spi;
import org.forgerock.opendj.ldap.IntermediateResponseHandler;
@@ -30,9 +29,7 @@
import org.forgerock.opendj.ldap.responses.SearchResultReference;
import org.forgerock.util.promise.PromiseImpl;
/**
 * Search result promise implementation.
 */
/** Search result promise implementation. */
public final class SearchResultLdapPromiseImpl extends ResultLdapPromiseImpl<SearchRequest, Result> implements
        SearchResultHandler {
    private SearchResultHandler searchResultHandler;
@@ -50,7 +47,6 @@
                || request.containsControl(ADNotificationRequestControl.OID);
    }
    /** {@inheritDoc} */
    @Override
    public boolean handleEntry(final SearchResultEntry entry) {
        // FIXME: there's a potential race condition here - the promise could
@@ -66,7 +62,6 @@
        return true;
    }
    /** {@inheritDoc} */
    @Override
    public boolean handleReference(final SearchResultReference reference) {
        // FIXME: there's a potential race condition here - the promise could
@@ -92,5 +87,4 @@
        // Persistent searches should not time out.
        return !isPersistentSearch;
    }
}
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldif/ConnectionEntryReader.java
@@ -12,9 +12,8 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2010 Sun Microsystems, Inc.
 * Portions Copyright 2011-2014 ForgeRock AS.
 * Portions Copyright 2011-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldif;
import java.util.NoSuchElementException;
@@ -96,13 +95,9 @@
 * interface which is not mockable.
 */
public class ConnectionEntryReader implements EntryReader {
    /*
     * See OPENDJ-1124 for more discussion about why this class is non-final.
     */
    /* See OPENDJ-1124 for more discussion about why this class is non-final. */
    /**
     * Result handler that places all responses in a queue.
     */
    /** Result handler that places all responses in a queue. */
    private static final class BufferHandler implements SearchResultHandler, LdapResultHandler<Result> {
        private final BlockingQueue<Response> responses;
        private volatile boolean isInterrupted;
@@ -204,17 +199,13 @@
        promise = connection.searchAsync(searchRequest, buffer).thenOnResult(buffer).thenOnException(buffer);
    }
    /**
     * Closes this connection entry reader, canceling the search request if it
     * is still active.
     */
    /** Closes this connection entry reader, canceling the search request if it is still active. */
    @Override
    public void close() {
        // Cancel the search if it is still running.
        promise.cancel(true);
    }
    /** {@inheritDoc} */
    @Override
    public boolean hasNext() throws LdapException {
        // Poll for the next response if needed.
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldif/LDIFChangeRecordReader.java
@@ -12,7 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009-2010 Sun Microsystems, Inc.
 * Portions copyright 2011-2015 ForgeRock AS.
 * Portions copyright 2011-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldif;
@@ -185,7 +185,6 @@
        super(Arrays.asList(ldifLines));
    }
    /** {@inheritDoc} */
    @Override
    public void close() throws IOException {
        close0();
@@ -373,10 +372,7 @@
            }
            try {
                /*
                 * Read the DN of the entry and see if it is one that should be
                 * included in the import.
                 */
                /* Read the DN of the entry and see if it is one that should be included in the import. */
                final DN entryDN = readLDIFRecordDN(record);
                if (entryDN == null) {
                    // Skip version record.
@@ -559,10 +555,7 @@
                    schemaErrors.add(message);
                    continue;
                default: // Ignore
                    /*
                     * This should not happen: we should be using a non-strict
                     * schema for this policy.
                     */
                    /* This should not happen: we should be using a non-strict schema for this policy. */
                    throw new IllegalStateException("Schema is not consistent with policy", e);
                }
            } catch (final LocalizedIllegalArgumentException e) {
@@ -597,10 +590,7 @@
                attributeDescription = attributeDescription.withOption("binary");
            }
            /*
             * Now go through the rest of the attributes until the "-" line is
             * reached.
             */
            /* Now go through the rest of the attributes until the "-" line is reached. */
            attributeValues.clear();
            while (record.iterator.hasNext()) {
                ldifLine = record.iterator.next();
@@ -747,5 +737,4 @@
        return modifyDNRequest;
    }
}
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldif/LDIFChangeRecordWriter.java
@@ -12,9 +12,8 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions copyright 2012-2015 ForgeRock AS.
 * Portions copyright 2012-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldif;
import java.io.IOException;
@@ -62,7 +61,6 @@
 *      Interchange Format (LDIF) - Technical Specification </a>
 */
public final class LDIFChangeRecordWriter extends AbstractLDIFWriter implements ChangeRecordWriter {
    /**
     * Returns the LDIF string representation of the provided change record.
     *
@@ -114,13 +112,11 @@
        super(writer);
    }
    /** {@inheritDoc} */
    @Override
    public void close() throws IOException {
        close0();
    }
    /** {@inheritDoc} */
    @Override
    public void flush() throws IOException {
        flush0();
@@ -246,7 +242,6 @@
        return this;
    }
    /** {@inheritDoc} */
    @Override
    public LDIFChangeRecordWriter writeChangeRecord(final AddRequest change) throws IOException {
        Reject.ifNull(change);
@@ -277,7 +272,6 @@
        return this;
    }
    /** {@inheritDoc} */
    @Override
    public LDIFChangeRecordWriter writeChangeRecord(final ChangeRecord change) throws IOException {
        Reject.ifNull(change);
@@ -294,7 +288,6 @@
        return this;
    }
    /** {@inheritDoc} */
    @Override
    public LDIFChangeRecordWriter writeChangeRecord(final DeleteRequest change) throws IOException {
        Reject.ifNull(change);
@@ -314,7 +307,6 @@
        return this;
    }
    /** {@inheritDoc} */
    @Override
    public LDIFChangeRecordWriter writeChangeRecord(final ModifyDNRequest change)
            throws IOException {
@@ -351,7 +343,6 @@
        return this;
    }
    /** {@inheritDoc} */
    @Override
    public LDIFChangeRecordWriter writeChangeRecord(final ModifyRequest change) throws IOException {
        Reject.ifNull(change);
@@ -393,11 +384,9 @@
        return this;
    }
    /** {@inheritDoc} */
    @Override
    public LDIFChangeRecordWriter writeComment(final CharSequence comment) throws IOException {
        writeComment0(comment);
        return this;
    }
}
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldif/LDIFEntryReader.java
@@ -12,7 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009-2010 Sun Microsystems, Inc.
 * Portions copyright 2011-2015 ForgeRock AS.
 * Portions copyright 2011-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldif;
@@ -146,7 +146,6 @@
        super(Arrays.asList(ldifLines));
    }
    /** {@inheritDoc} */
    @Override
    public void close() throws IOException {
        close0();
@@ -360,10 +359,7 @@
            }
            try {
                /*
                 * Read the DN of the entry and see if it is one that should be
                 * included in the import.
                 */
                /* Read the DN of the entry and see if it is one that should be included in the import. */
                final DN entryDN = readLDIFRecordDN(record);
                if (entryDN == null) {
                    // Skip version record.
@@ -421,5 +417,4 @@
        return nextEntry;
    }
}
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/AbstractAsynchronousConnectionTestCase.java
@@ -12,9 +12,8 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2010 Sun Microsystems, Inc.
 * Portions Copyright 2011-2015 ForgeRock AS.
 * Portions Copyright 2011-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap;
import java.util.LinkedList;
@@ -56,7 +55,6 @@
 */
@SuppressWarnings("javadoc")
public class AbstractAsynchronousConnectionTestCase extends SdkTestCase {
    public final class MockConnection extends AbstractAsynchronousConnection {
        private final ResultCode resultCode;
        private final SearchResultEntry[] entries;
@@ -66,7 +64,6 @@
            this.entries = entries;
        }
        /** {@inheritDoc} */
        @Override
        public LdapPromise<Void> abandonAsync(AbandonRequest request) {
            if (!resultCode.isExceptional()) {
@@ -76,86 +73,73 @@
            }
        }
        /** {@inheritDoc} */
        @Override
        public LdapPromise<Result> addAsync(AddRequest request,
                IntermediateResponseHandler intermediateResponseHandler) {
            return getPromiseFromResultCode(newResult(resultCode));
        }
        /** {@inheritDoc} */
        @Override
        public void addConnectionEventListener(ConnectionEventListener listener) {
            // Do nothing.
        }
        /** {@inheritDoc} */
        @Override
        public LdapPromise<BindResult> bindAsync(BindRequest request,
                IntermediateResponseHandler intermediateResponseHandler) {
            return getPromiseFromResultCode(newBindResult(resultCode));
        }
        /** {@inheritDoc} */
        @Override
        public void close(UnbindRequest request, String reason) {
            // Do nothing.
        }
        /** {@inheritDoc} */
        @Override
        public LdapPromise<CompareResult> compareAsync(CompareRequest request,
                IntermediateResponseHandler intermediateResponseHandler) {
            return getPromiseFromResultCode(newCompareResult(resultCode));
        }
        /** {@inheritDoc} */
        @Override
        public LdapPromise<Result> deleteAsync(DeleteRequest request,
                IntermediateResponseHandler intermediateResponseHandler) {
            return getPromiseFromResultCode(newResult(resultCode));
        }
        /** {@inheritDoc} */
        @Override
        public <R extends ExtendedResult> LdapPromise<R> extendedRequestAsync(ExtendedRequest<R> request,
                IntermediateResponseHandler intermediateResponseHandler) {
            return getPromiseFromResultCode(request.getResultDecoder().newExtendedErrorResult(resultCode, "", ""));
        }
        /** {@inheritDoc} */
        @Override
        public boolean isClosed() {
            return false;
        }
        /** {@inheritDoc} */
        @Override
        public boolean isValid() {
            return true;
        }
        /** {@inheritDoc} */
        @Override
        public LdapPromise<Result> modifyAsync(ModifyRequest request,
                IntermediateResponseHandler intermediateResponseHandler) {
            return getPromiseFromResultCode(newResult(resultCode));
        }
        /** {@inheritDoc} */
        @Override
        public LdapPromise<Result> modifyDNAsync(ModifyDNRequest request,
                IntermediateResponseHandler intermediateResponseHandler) {
            return getPromiseFromResultCode(newResult(resultCode));
        }
        /** {@inheritDoc} */
        @Override
        public void removeConnectionEventListener(ConnectionEventListener listener) {
            // Do nothing.
        }
        /** {@inheritDoc} */
        @Override
        public LdapPromise<Result> searchAsync(SearchRequest request,
                IntermediateResponseHandler intermediateResponseHandler, SearchResultHandler entryHandler) {
@@ -174,12 +158,10 @@
            }
        }
        /** {@inheritDoc} */
        @Override
        public String toString() {
            return "MockConnection";
        }
    }
    @Test
@@ -477,5 +459,4 @@
            verify(exceptionHandler).handleException(any(LdapException.class));
        }
    }
}
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/MockConnectionEventListener.java
@@ -11,7 +11,7 @@
 * Header, with the fields enclosed by brackets [] replaced by your own identifying
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2012-2014 ForgeRock AS.
 * Copyright 2012-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap;
@@ -23,10 +23,7 @@
import org.forgerock.opendj.ldap.responses.ExtendedResult;
/**
 * A connection event listener which records events and signals when it has been
 * notified.
 */
/** A connection event listener which records events and signals when it has been notified. */
@SuppressWarnings("javadoc")
public final class MockConnectionEventListener implements ConnectionEventListener {
    private final CountDownLatch closedLatch = new CountDownLatch(1);
@@ -37,14 +34,12 @@
    private ExtendedResult notification;
    private final AtomicInteger invocationCount = new AtomicInteger();
    /** {@inheritDoc} */
    @Override
    public void handleConnectionClosed() {
        invocationCount.incrementAndGet();
        closedLatch.countDown();
    }
    /** {@inheritDoc} */
    @Override
    public void handleConnectionError(boolean isDisconnectNotification, LdapException error) {
        this.isDisconnectNotification = isDisconnectNotification;
@@ -53,7 +48,6 @@
        errorLatch.countDown();
    }
    /** {@inheritDoc} */
    @Override
    public void handleUnsolicitedNotification(ExtendedResult notification) {
        this.notification = notification;
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/AbstractSubstringMatchingRuleImplTest.java
@@ -38,30 +38,23 @@
import static org.mockito.Mockito.*;
import static org.testng.Assert.*;
/**
 * Tests all generic code of AbstractSubstringMatchingRuleImpl.
 */
/** Tests all generic code of AbstractSubstringMatchingRuleImpl. */
@SuppressWarnings("javadoc")
public class AbstractSubstringMatchingRuleImplTest extends AbstractSchemaTestCase {
    private int subStringLength = 3;
    private static class FakeSubstringMatchingRuleImpl extends AbstractSubstringMatchingRuleImpl {
        FakeSubstringMatchingRuleImpl() {
            super(SMR_CASE_EXACT_OID, EMR_CASE_EXACT_OID);
        }
        /** {@inheritDoc} */
        @Override
        public ByteString normalizeAttributeValue(Schema schema, ByteSequence value) throws DecodeException {
            return value.toByteString();
        }
    }
    static class FakeIndexQueryFactory implements IndexQueryFactory<String> {
        private final IndexingOptions options;
        private final boolean normalizedValuesAreReadable;
@@ -129,7 +122,6 @@
        public IndexingOptions getIndexingOptions() {
            return options;
        }
    }
    private MatchingRuleImpl getRule() {
@@ -160,7 +152,7 @@
        };
    }
    @Test(dataProvider = "invalidAssertions", expectedExceptions = { DecodeException.class })
    @Test(dataProvider = "invalidAssertions", expectedExceptions = DecodeException.class)
    public void testInvalidAssertion(String assertionValue) throws Exception {
        getRule().getAssertion(null, valueOfUtf8(assertionValue));
    }
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/AttributeTypeSyntaxTest.java
@@ -12,7 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions copyright 2014-2015 ForgeRock AS.
 * Portions copyright 2014-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -21,12 +21,9 @@
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
/**
 * Attribute type syntax tests.
 */
/** Attribute type syntax tests. */
@Test
public class AttributeTypeSyntaxTest extends AbstractSyntaxTestCase {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "acceptableValues")
    public Object[][] createAcceptableValues() {
@@ -110,10 +107,8 @@
                        + " NO-USER-MODIFICATION USAGE userApplications", false }, };
    }
    /** {@inheritDoc} */
    @Override
    protected Syntax getRule() {
        return Schema.getCoreSchema().getSyntax(SYNTAX_ATTRIBUTE_TYPE_OID);
    }
}
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/BitStringEqualityMatchingRuleTest.java
@@ -12,6 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions Copyright 2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -20,11 +21,8 @@
import org.forgerock.opendj.ldap.ConditionResult;
import org.testng.annotations.DataProvider;
/**
 * Test the BitStringEqualityMatchingRule.
 */
/** Test the BitStringEqualityMatchingRule. */
public class BitStringEqualityMatchingRuleTest extends MatchingRuleTest {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingRuleInvalidAttributeValues")
    public Object[][] createMatchingRuleInvalidAttributeValues() {
@@ -36,7 +34,6 @@
            { "\'1010\'A" }, };
    }
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingrules")
    public Object[][] createMatchingRuleTest() {
@@ -46,7 +43,6 @@
            { "\'0\'B", "\'1\'B", ConditionResult.FALSE }, };
    }
    /** {@inheritDoc} */
    @Override
    protected MatchingRule getRule() {
        return Schema.getCoreSchema().getMatchingRule(EMR_BIT_STRING_OID);
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/BitStringSyntaxTest.java
@@ -12,7 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions copyright 2014-2015 ForgeRock AS.
 * Portions copyright 2014-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -24,7 +24,6 @@
/** Bit string syntax tests. */
@Test
public class BitStringSyntaxTest extends AbstractSyntaxTestCase {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "acceptableValues")
    public Object[][] createAcceptableValues() {
@@ -38,7 +37,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    protected Syntax getRule() {
        return Schema.getCoreSchema().getSyntax(SYNTAX_BIT_STRING_OID);
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/BooleanEqualityMatchingRuleTest.java
@@ -12,6 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions Copyright 2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -20,19 +21,14 @@
import org.forgerock.opendj.ldap.ConditionResult;
import org.testng.annotations.DataProvider;
/**
 * Test the BooleanEqualityMatchingRule.
 */
/** Test the BooleanEqualityMatchingRule. */
public class BooleanEqualityMatchingRuleTest extends MatchingRuleTest {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingRuleInvalidAttributeValues")
    public Object[][] createMatchingRuleInvalidAttributeValues() {
        return new Object[][] { { "garbage" }, };
    }
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingrules")
    public Object[][] createMatchingRuleTest() {
@@ -48,10 +44,8 @@
            { "TRUE", "false", ConditionResult.FALSE }, };
    }
    /** {@inheritDoc} */
    @Override
    protected MatchingRule getRule() {
        return Schema.getCoreSchema().getMatchingRule(EMR_BOOLEAN_OID);
    }
}
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/CaseExactEqualityMatchingRuleTest.java
@@ -12,6 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions Copyright 2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -20,19 +21,14 @@
import org.forgerock.opendj.ldap.ConditionResult;
import org.testng.annotations.DataProvider;
/**
 * Test the CaseExactEqualityMatchingRule.
 */
/** Test the CaseExactEqualityMatchingRule. */
public class CaseExactEqualityMatchingRuleTest extends MatchingRuleTest {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingRuleInvalidAttributeValues")
    public Object[][] createMatchingRuleInvalidAttributeValues() {
        return new Object[][] {};
    }
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingrules")
    public Object[][] createMatchingRuleTest() {
@@ -47,10 +43,8 @@
            { "ABC45678", "abc45678", ConditionResult.FALSE }, };
    }
    /** {@inheritDoc} */
    @Override
    protected MatchingRule getRule() {
        return Schema.getCoreSchema().getMatchingRule(EMR_CASE_EXACT_OID);
    }
}
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/CaseExactIA5EqualityMatchingRuleTest.java
@@ -12,6 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions Copyright 2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -20,12 +21,8 @@
import org.forgerock.opendj.ldap.ConditionResult;
import org.testng.annotations.DataProvider;
/**
 * Test the CaseExactIA5EqualityMatchingRule.
 */
/** Test the CaseExactIA5EqualityMatchingRule. */
public class CaseExactIA5EqualityMatchingRuleTest extends MatchingRuleTest {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingRuleInvalidAttributeValues")
    public Object[][] createMatchingRuleInvalidAttributeValues() {
@@ -34,7 +31,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingrules")
    public Object[][] createMatchingRuleTest() {
@@ -49,10 +45,8 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    protected MatchingRule getRule() {
        return Schema.getCoreSchema().getMatchingRule(EMR_CASE_EXACT_IA5_OID);
    }
}
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/CaseExactOrderingMatchingRuleTest.java
@@ -12,6 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions Copyright 2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -19,19 +20,14 @@
import org.testng.annotations.DataProvider;
/**
 * Test the CaseExactOrderingMatchingRule.
 */
/** Test the CaseExactOrderingMatchingRule. */
public class CaseExactOrderingMatchingRuleTest extends OrderingMatchingRuleTest {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "OrderingMatchingRuleInvalidValues")
    public Object[][] createOrderingMatchingRuleInvalidValues() {
        return new Object[][] {};
    }
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "Orderingmatchingrules")
    public Object[][] createOrderingMatchingRuleTestData() {
@@ -41,7 +37,6 @@
            { "abcdef", "abcdef", 0 }, };
    }
    /** {@inheritDoc} */
    @Override
    protected MatchingRule getRule() {
        return Schema.getCoreSchema().getMatchingRule(OMR_CASE_EXACT_OID);
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/CaseIgnoreEqualityMatchingRuleTest.java
@@ -12,6 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions Copyright 2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -20,18 +21,14 @@
import org.forgerock.opendj.ldap.ConditionResult;
import org.testng.annotations.DataProvider;
/**
 * Test the CaseIgnoreEqualityMatchingRule.
 */
/** Test the CaseIgnoreEqualityMatchingRule. */
public class CaseIgnoreEqualityMatchingRuleTest extends MatchingRuleTest {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingRuleInvalidAttributeValues")
    public Object[][] createMatchingRuleInvalidAttributeValues() {
        return new Object[][] {};
    }
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingrules")
    public Object[][] createMatchingRuleTest() {
@@ -52,12 +49,9 @@
            { "foo\u0149bar", "foo\u02BC\u006Ebar", ConditionResult.TRUE },
            { "foo\u017Bbar", "foo\u017Cbar", ConditionResult.TRUE },
            { "foo\u017BBAR", "foo\u017Cbar", ConditionResult.TRUE },
        };
    }
    /** {@inheritDoc} */
    @Override
    protected MatchingRule getRule() {
        return Schema.getCoreSchema().getMatchingRule(EMR_CASE_IGNORE_OID);
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/CaseIgnoreIA5EqualityMatchingRuleTest.java
@@ -12,6 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions Copyright 2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -20,12 +21,8 @@
import org.forgerock.opendj.ldap.ConditionResult;
import org.testng.annotations.DataProvider;
/**
 * Test the CaseExactIA5EqualityMatchingRule.
 */
/** Test the CaseExactIA5EqualityMatchingRule. */
public class CaseIgnoreIA5EqualityMatchingRuleTest extends MatchingRuleTest {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingRuleInvalidAttributeValues")
    public Object[][] createMatchingRuleInvalidAttributeValues() {
@@ -34,7 +31,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingrules")
    public Object[][] createMatchingRuleTest() {
@@ -44,10 +40,8 @@
            { "ABC45678", "abc45678", ConditionResult.TRUE }, };
    }
    /** {@inheritDoc} */
    @Override
    protected MatchingRule getRule() {
        return Schema.getCoreSchema().getMatchingRule(EMR_CASE_IGNORE_IA5_OID);
    }
}
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/CaseIgnoreOrderingMatchingRuleTest.java
@@ -12,6 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions Copyright 2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -19,19 +20,14 @@
import org.testng.annotations.DataProvider;
/**
 * Test the CaseIgnoreOrderingMatchingRule.
 */
/** Test the CaseIgnoreOrderingMatchingRule. */
public class CaseIgnoreOrderingMatchingRuleTest extends OrderingMatchingRuleTest {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "OrderingMatchingRuleInvalidValues")
    public Object[][] createOrderingMatchingRuleInvalidValues() {
        return new Object[][] {};
    }
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "Orderingmatchingrules")
    public Object[][] createOrderingMatchingRuleTestData() {
@@ -51,7 +47,6 @@
            { "a", "\u00f8", -1 }, };
    }
    /** {@inheritDoc} */
    @Override
    protected MatchingRule getRule() {
        return Schema.getCoreSchema().getMatchingRule(OMR_CASE_IGNORE_OID);
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/CollationEqualityMatchingRuleTest.java
@@ -11,7 +11,7 @@
 * Header, with the fields enclosed by brackets [] replaced by your own identifying
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2014-2015 ForgeRock AS.
 * Copyright 2014-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -29,15 +29,12 @@
@SuppressWarnings("javadoc")
@Test
public class CollationEqualityMatchingRuleTest extends MatchingRuleTest {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingRuleInvalidAttributeValues")
    public Object[][] createMatchingRuleInvalidAttributeValues() {
        return new Object[][] { };
    }
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingrules")
    public Object[][] createMatchingRuleTest() {
@@ -72,7 +69,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    protected MatchingRule getRule() {
        return Schema.getCoreSchema().getMatchingRule("fr.eq");
@@ -107,5 +103,4 @@
        ByteString normalizedValue = matchingRule.normalizeAttributeValue(value);
        assertEquals(indexQuery, "exactMatch(fr.shared, value=='" + normalizedValue.toHexString() + "')");
    }
}
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/CollationGreaterThanMatchingRuleTest.java
@@ -11,7 +11,7 @@
 * Header, with the fields enclosed by brackets [] replaced by your own identifying
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2014-2015 ForgeRock AS.
 * Copyright 2014-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -28,15 +28,12 @@
@SuppressWarnings("javadoc")
@Test
public class CollationGreaterThanMatchingRuleTest extends MatchingRuleTest {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingRuleInvalidAttributeValues")
    public Object[][] createMatchingRuleInvalidAttributeValues() {
        return new Object[][] { };
    }
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingrules")
    public Object[][] createMatchingRuleTest() {
@@ -71,7 +68,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    protected MatchingRule getRule() {
        return Schema.getCoreSchema().getMatchingRule("fr.gt");
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/CollationGreaterThanOrEqualMatchingRuleTest.java
@@ -11,7 +11,7 @@
 * Header, with the fields enclosed by brackets [] replaced by your own identifying
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2014-2015 ForgeRock AS.
 * Copyright 2014-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -28,15 +28,12 @@
@SuppressWarnings("javadoc")
@Test
public class CollationGreaterThanOrEqualMatchingRuleTest extends MatchingRuleTest {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingRuleInvalidAttributeValues")
    public Object[][] createMatchingRuleInvalidAttributeValues() {
        return new Object[][] { };
    }
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingrules")
    public Object[][] createMatchingRuleTest() {
@@ -71,11 +68,9 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    protected MatchingRule getRule() {
        return Schema.getCoreSchema().getMatchingRule("fr.gte");
    }
    @Test
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/CollationLessThanMatchingRuleTest.java
@@ -11,7 +11,7 @@
 * Header, with the fields enclosed by brackets [] replaced by your own identifying
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2014-2015 ForgeRock AS.
 * Copyright 2014-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -28,15 +28,12 @@
@SuppressWarnings("javadoc")
@Test
public class CollationLessThanMatchingRuleTest extends MatchingRuleTest {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingRuleInvalidAttributeValues")
    public Object[][] createMatchingRuleInvalidAttributeValues() {
        return new Object[][] { };
    }
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingrules")
    public Object[][] createMatchingRuleTest() {
@@ -71,7 +68,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    protected MatchingRule getRule() {
        return Schema.getCoreSchema().getMatchingRule("fr.lt");
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/CollationLessThanOrEqualMatchingRuleTest.java
@@ -11,7 +11,7 @@
 * Header, with the fields enclosed by brackets [] replaced by your own identifying
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2014-2015 ForgeRock AS.
 * Copyright 2014-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -28,15 +28,12 @@
@SuppressWarnings("javadoc")
@Test
public class CollationLessThanOrEqualMatchingRuleTest extends MatchingRuleTest {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingRuleInvalidAttributeValues")
    public Object[][] createMatchingRuleInvalidAttributeValues() {
        return new Object[][] { };
    }
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingrules")
    public Object[][] createMatchingRuleTest() {
@@ -71,7 +68,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    protected MatchingRule getRule() {
        return Schema.getCoreSchema().getMatchingRule("fr.lte");
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/CollationSubstringMatchingRuleTest.java
@@ -28,7 +28,6 @@
@SuppressWarnings("javadoc")
@Test
public class CollationSubstringMatchingRuleTest extends SubstringMatchingRuleTest {
    @Override
    @DataProvider(name = "substringInvalidAssertionValues")
    public Object[][] createMatchingRuleInvalidAssertionValues() {
@@ -41,7 +40,6 @@
        return new Object[][] { };
    }
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "substringFinalMatchData")
    public Object[][] createSubstringFinalMatchData() {
@@ -72,7 +70,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "substringInitialMatchData")
    public Object[][] createSubstringInitialMatchData() {
@@ -99,7 +96,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "substringMiddleMatchData")
    public Object[][] createSubstringMiddleMatchData() {
@@ -133,7 +129,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    protected MatchingRule getRule() {
        return Schema.getCoreSchema().getMatchingRule("fr.sub");
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/CountryStringSyntaxTest.java
@@ -13,7 +13,7 @@
 *
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions Copyright 2012 Manuel Gaupp
 * Portions copyright 2014 ForgeRock AS.
 * Portions copyright 2014-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -22,9 +22,7 @@
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
/**
 * Country String syntax tests.
 */
/** Country String syntax tests. */
@Test
public class CountryStringSyntaxTest extends AbstractSyntaxTestCase {
    @Override
@@ -42,7 +40,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    protected Syntax getRule() {
        return Schema.getCoreSchema().getSyntax(SYNTAX_COUNTRY_STRING_OID);
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/DITContentRuleSyntaxTest.java
@@ -12,7 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions copyright 2014 ForgeRock AS.
 * Portions copyright 2014-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -20,9 +20,7 @@
import org.testng.annotations.DataProvider;
/**
 * DIT content rule syntax tests.
 */
/** DIT content rule syntax tests. */
public class DITContentRuleSyntaxTest extends AbstractSyntaxTestCase {
    @Override
    @DataProvider(name = "acceptableValues")
@@ -60,7 +58,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    protected Syntax getRule() {
        return Schema.getCoreSchema().getSyntax(SYNTAX_DIT_CONTENT_RULE_OID);
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/DirectoryStringFirstComponentEqualityMatchingRuleTest.java
@@ -11,7 +11,7 @@
 * Header, with the fields enclosed by brackets [] replaced by your own identifying
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2014 ForgeRock AS.
 * Copyright 2014-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -21,20 +21,15 @@
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
/**
 * Test the DirectoryStringFirstComponentEqualityMatchingRule.
 */
/** Test the DirectoryStringFirstComponentEqualityMatchingRule. */
@Test
public class DirectoryStringFirstComponentEqualityMatchingRuleTest extends MatchingRuleTest {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingRuleInvalidAttributeValues")
    public Object[][] createMatchingRuleInvalidAttributeValues() {
        return new Object[][] {};
    }
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingrules")
    public Object[][] createMatchingRuleTest() {
@@ -45,10 +40,8 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    protected MatchingRule getRule() {
        return Schema.getCoreSchema().getMatchingRule(EMR_DIRECTORY_STRING_FIRST_COMPONENT_OID);
    }
}
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/EnumSyntaxTestCase.java
@@ -12,7 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions copyright 2014-2015 ForgeRock AS.
 * Portions copyright 2014-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -25,12 +25,9 @@
import static org.forgerock.opendj.ldap.schema.SchemaConstants.*;
import static org.testng.Assert.*;
/**
 * Enum syntax tests.
 */
/** Enum syntax tests. */
@SuppressWarnings("javadoc")
public class EnumSyntaxTestCase extends AbstractSyntaxTestCase {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "acceptableValues")
    public Object[][] createAcceptableValues() {
@@ -73,7 +70,6 @@
        builder.toSchema();
    }
    /** {@inheritDoc} */
    @Override
    protected Syntax getRule() throws SchemaException, DecodeException {
        final SchemaBuilder builder = new SchemaBuilder(Schema.getCoreSchema());
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/GeneralizedTimeEqualityMatchingRuleTest.java
@@ -11,7 +11,7 @@
 * Header, with the fields enclosed by brackets [] replaced by your own identifying
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2014 ForgeRock AS.
 * Copyright 2014-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -20,12 +20,8 @@
import org.forgerock.opendj.ldap.ConditionResult;
import org.testng.annotations.DataProvider;
/**
 * Test the GeneralizedTimeEqualityMatchingRule.
 */
/** Test the GeneralizedTimeEqualityMatchingRule. */
public class GeneralizedTimeEqualityMatchingRuleTest extends MatchingRuleTest {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingRuleInvalidAttributeValues")
    public Object[][] createMatchingRuleInvalidAttributeValues() {
@@ -51,7 +47,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingrules")
    public Object[][] createMatchingRuleTest() {
@@ -74,10 +69,8 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    protected MatchingRule getRule() {
        return Schema.getCoreSchema().getMatchingRule(EMR_GENERALIZED_TIME_OID);
    }
}
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/GeneralizedTimeOrderingMatchingRuleTest.java
@@ -12,7 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions Copyright 2015 ForgeRock AS.
 * Portions Copyright 2015-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -20,12 +20,8 @@
import org.testng.annotations.DataProvider;
/**
 * Test the GeneralizedTimeOrderingMatchingRule.
 */
/** Test the GeneralizedTimeOrderingMatchingRule. */
public class GeneralizedTimeOrderingMatchingRuleTest extends OrderingMatchingRuleTest {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "OrderingMatchingRuleInvalidValues")
    public Object[][] createOrderingMatchingRuleInvalidValues() {
@@ -51,7 +47,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "Orderingmatchingrules")
    public Object[][] createOrderingMatchingRuleTestData() {
@@ -70,7 +65,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    protected MatchingRule getRule() {
        return Schema.getCoreSchema().getMatchingRule(OMR_GENERALIZED_TIME_OID);
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/GeneralizedTimeSyntaxTest.java
@@ -12,7 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions copyright 2014-2015 ForgeRock AS.
 * Portions copyright 2014-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -20,9 +20,7 @@
import org.testng.annotations.DataProvider;
/**
 * Generalized time syntax tests.
 */
/** Generalized time syntax tests. */
public class GeneralizedTimeSyntaxTest extends AbstractSyntaxTestCase {
    @Override
    @DataProvider(name = "acceptableValues")
@@ -39,10 +37,8 @@
            { "2006", false }, };
    }
    /** {@inheritDoc} */
    @Override
    protected Syntax getRule() {
        return Schema.getCoreSchema().getSyntax(SYNTAX_GENERALIZED_TIME_OID);
    }
}
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/GuideSyntaxTest.java
@@ -12,7 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions copyright 2014 ForgeRock AS.
 * Portions copyright 2014-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -20,11 +20,8 @@
import org.testng.annotations.DataProvider;
/**
 * Guide syntax tests.
 */
/** Guide syntax tests. */
public class GuideSyntaxTest extends AbstractSyntaxTestCase {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "acceptableValues")
    public Object[][] createAcceptableValues() {
@@ -36,7 +33,6 @@
            { "sn$EQ|(cn$APPROX&?false)", true }, { "sn$EQ|(cn$APPROX&|?false)", false }, };
    }
    /** {@inheritDoc} */
    @Override
    protected Syntax getRule() {
        return Schema.getCoreSchema().getSyntax(SYNTAX_GUIDE_OID);
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/IA5StringSyntaxTest.java
@@ -12,7 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions copyright 2014 ForgeRock AS.
 * Portions copyright 2014-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -20,21 +20,16 @@
import org.testng.annotations.DataProvider;
/**
 * IA5 string syntax tests.
 */
/** IA5 string syntax tests. */
public class IA5StringSyntaxTest extends AbstractSyntaxTestCase {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "acceptableValues")
    public Object[][] createAcceptableValues() {
        return new Object[][] { { "12345678", true }, { "12345678\u2163", false }, };
    }
    /** {@inheritDoc} */
    @Override
    protected Syntax getRule() {
        return Schema.getCoreSchema().getSyntax(SYNTAX_IA5_STRING_OID);
    }
}
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/IntegerEqualityMatchingRuleTest.java
@@ -11,7 +11,7 @@
 * Header, with the fields enclosed by brackets [] replaced by your own identifying
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2014 ForgeRock AS.
 * Copyright 2014-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -20,12 +20,8 @@
import org.forgerock.opendj.ldap.ConditionResult;
import org.testng.annotations.DataProvider;
/**
 * Test the IntegerEqualityMatchingRule.
 */
/** Test the IntegerEqualityMatchingRule. */
public class IntegerEqualityMatchingRuleTest extends MatchingRuleTest {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingRuleInvalidAttributeValues")
    public Object[][] createMatchingRuleInvalidAttributeValues() {
@@ -50,7 +46,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingrules")
    public Object[][] createMatchingRuleTest() {
@@ -66,10 +61,8 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    protected MatchingRule getRule() {
        return Schema.getCoreSchema().getMatchingRule(EMR_INTEGER_OID);
    }
}
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/IntegerOrderingMatchingRuleTest.java
@@ -12,7 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions copyright 2014-2015 ForgeRock AS.
 * Portions copyright 2014-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -27,13 +27,9 @@
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
/**
 * Test the IntegerOrderingMatchingRule.
 */
/** Test the IntegerOrderingMatchingRule. */
@SuppressWarnings("javadoc")
public class IntegerOrderingMatchingRuleTest extends OrderingMatchingRuleTest {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "OrderingMatchingRuleInvalidValues")
    public Object[][] createOrderingMatchingRuleInvalidValues() {
@@ -58,7 +54,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "Orderingmatchingrules")
    public Object[][] createOrderingMatchingRuleTestData() {
@@ -86,7 +81,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    protected MatchingRule getRule() {
        return Schema.getCoreSchema().getMatchingRule(OMR_INTEGER_OID);
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/IntegerSyntaxTest.java
@@ -12,7 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions copyright 2014-2015 ForgeRock AS.
 * Portions copyright 2014-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -21,12 +21,9 @@
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
/**
 * Integer syntax tests.
 */
/** Integer syntax tests. */
@Test
public class IntegerSyntaxTest extends AbstractSyntaxTestCase {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "acceptableValues")
    public Object[][] createAcceptableValues() {
@@ -43,10 +40,8 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    protected Syntax getRule() {
        return Schema.getCoreSchema().getSyntax(SYNTAX_INTEGER_OID);
    }
}
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/LDAPSyntaxTest.java
@@ -12,7 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions copyright 2014 ForgeRock AS.
 * Portions copyright 2014-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -21,12 +21,9 @@
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
/**
 * LDAP syntax tests.
 */
/** LDAP syntax tests. */
@Test
public class LDAPSyntaxTest extends AbstractSyntaxTestCase {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "acceptableValues")
    public Object[][] createAcceptableValues() {
@@ -73,7 +70,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    protected Syntax getRule() {
        return Schema.getCoreSchema().getSyntax(SYNTAX_LDAP_SYNTAX_OID);
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/MatchingRuleSyntaxTest.java
@@ -12,7 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions copyright 2014 ForgeRock AS.
 * Portions copyright 2014-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -21,12 +21,9 @@
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
/**
 * Matching rule syntax tests.
 */
/** Matching rule syntax tests. */
@Test
public class MatchingRuleSyntaxTest extends AbstractSyntaxTestCase {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "acceptableValues")
    public Object[][] createAcceptableValues() {
@@ -43,10 +40,8 @@
                        + " X-name ( 'this is an extension' ) ", false }, };
    }
    /** {@inheritDoc} */
    @Override
    protected Syntax getRule() {
        return Schema.getCoreSchema().getSyntax(SYNTAX_MATCHING_RULE_OID);
    }
}
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/MatchingRuleUseSyntaxTest.java
@@ -12,7 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions copyright 2014 ForgeRock AS.
 * Portions copyright 2014-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -21,12 +21,9 @@
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
/**
 * Matching rule use syntax tests.
 */
/** Matching rule use syntax tests. */
@Test
public class MatchingRuleUseSyntaxTest extends AbstractSyntaxTestCase {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "acceptableValues")
    public Object[][] createAcceptableValues() {
@@ -41,7 +38,6 @@
                        + " X-name ( 'this is an extension' ) ", false }, };
    }
    /** {@inheritDoc} */
    @Override
    protected Syntax getRule() {
        return Schema.getCoreSchema().getSyntax(SYNTAX_MATCHING_RULE_USE_OID);
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/NumericStringEqualityMatchingRuleTest.java
@@ -11,7 +11,7 @@
 * Header, with the fields enclosed by brackets [] replaced by your own identifying
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2014 ForgeRock AS.
 * Copyright 2014-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -21,13 +21,9 @@
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
/**
 * Test the NumericStringEqualityMatchingRule.
 */
/** Test the NumericStringEqualityMatchingRule. */
@Test
public class NumericStringEqualityMatchingRuleTest extends MatchingRuleTest {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingRuleInvalidAttributeValues")
    public Object[][] createMatchingRuleInvalidAttributeValues() {
@@ -35,7 +31,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingrules")
    public Object[][] createMatchingRuleTest() {
@@ -50,10 +45,8 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    protected MatchingRule getRule() {
        return Schema.getCoreSchema().getMatchingRule(EMR_NUMERIC_STRING_OID);
    }
}
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/NumericStringOrderingMatchingRuleTest.java
@@ -12,6 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions Copyright 2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -20,13 +21,9 @@
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
/**
 * Test the NumericStringOrderingMatchingRule.
 */
/** Test the NumericStringOrderingMatchingRule. */
@Test
public class NumericStringOrderingMatchingRuleTest extends OrderingMatchingRuleTest {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "OrderingMatchingRuleInvalidValues")
    public Object[][] createOrderingMatchingRuleInvalidValues() {
@@ -34,7 +31,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "Orderingmatchingrules")
    public Object[][] createOrderingMatchingRuleTestData() {
@@ -52,7 +48,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    protected MatchingRule getRule() {
        return Schema.getCoreSchema().getMatchingRule(OMR_NUMERIC_STRING_OID);
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/OtherMailboxSyntaxTest.java
@@ -12,7 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions copyright 2014 ForgeRock AS.
 * Portions copyright 2014-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -21,19 +21,15 @@
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
/**
 * Other mailbox syntax tests.
 */
/** Other mailbox syntax tests. */
@Test
public class OtherMailboxSyntaxTest extends AbstractSyntaxTestCase {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "acceptableValues")
    public Object[][] createAcceptableValues() {
        return new Object[][] { { "MyMail$Mymailbox", true }, { "MyMailMymailbox", false }, };
    }
    /** {@inheritDoc} */
    @Override
    protected Syntax getRule() {
        return Schema.getCoreSchema().getSyntax(SYNTAX_OTHER_MAILBOX_OID);
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/PartialDateAndTimeMatchingRuleTestCase.java
@@ -34,8 +34,6 @@
@SuppressWarnings("javadoc")
@Test
public class PartialDateAndTimeMatchingRuleTestCase extends MatchingRuleTest {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingRuleInvalidAttributeValues")
    public Object[][] createMatchingRuleInvalidAttributeValues() {
@@ -98,7 +96,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingrules")
    public Object[][] createMatchingRuleTest() {
@@ -167,7 +164,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    protected MatchingRule getRule() {
        return CoreSchema.getInstance().getMatchingRule(SchemaConstants.MR_PARTIAL_DATE_AND_TIME_OID);
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/PresentationAddressEqualityMatchingRuleTest.java
@@ -11,7 +11,7 @@
 * Header, with the fields enclosed by brackets [] replaced by your own identifying
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2014 ForgeRock AS.
 * Copyright 2014-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -20,12 +20,8 @@
import org.forgerock.opendj.ldap.ConditionResult;
import org.testng.annotations.DataProvider;
/**
 * Test the PresentationAddressEqualityMatchingRule.
 */
/** Test the PresentationAddressEqualityMatchingRule. */
public class PresentationAddressEqualityMatchingRuleTest extends MatchingRuleTest {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingRuleInvalidAttributeValues")
    public Object[][] createMatchingRuleInvalidAttributeValues() {
@@ -33,7 +29,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingrules")
    public Object[][] createMatchingRuleTest() {
@@ -45,10 +40,8 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    protected MatchingRule getRule() {
        return Schema.getCoreSchema().getMatchingRule(EMR_PRESENTATION_ADDRESS_OID);
    }
}
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/ProtocolInformationEqualityMatchingRuleTest.java
@@ -11,7 +11,7 @@
 * Header, with the fields enclosed by brackets [] replaced by your own identifying
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2014 ForgeRock AS.
 * Copyright 2014-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -20,12 +20,8 @@
import org.forgerock.opendj.ldap.ConditionResult;
import org.testng.annotations.DataProvider;
/**
 * Test the ProtocolInformationEqualityMatchingRule.
 */
/** Test the ProtocolInformationEqualityMatchingRule. */
public class ProtocolInformationEqualityMatchingRuleTest extends MatchingRuleTest {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingRuleInvalidAttributeValues")
    public Object[][] createMatchingRuleInvalidAttributeValues() {
@@ -33,7 +29,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingrules")
    public Object[][] createMatchingRuleTest() {
@@ -45,10 +40,8 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    protected MatchingRule getRule() {
        return Schema.getCoreSchema().getMatchingRule(EMR_PROTOCOL_INFORMATION_OID);
    }
}
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/RegexSyntaxTestCase.java
@@ -12,7 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions copyright 2014 ForgeRock AS.
 * Portions copyright 2014-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -22,12 +22,9 @@
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
/**
 * Regex syntax tests.
 */
/** Regex syntax tests. */
@SuppressWarnings("javadoc")
public class RegexSyntaxTestCase extends AbstractSyntaxTestCase {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "acceptableValues")
    public Object[][] createAcceptableValues() {
@@ -52,7 +49,6 @@
        Assert.assertFalse(builder.toSchema().getWarnings().isEmpty());
    }
    /** {@inheritDoc} */
    @Override
    protected Syntax getRule() {
        final SchemaBuilder builder = new SchemaBuilder(Schema.getCoreSchema());
@@ -60,5 +56,4 @@
                .compile("^[a-z-A-Z]+:[0-9.]+\\d$"), false);
        return builder.toSchema().getSyntax("1.1.1");
    }
}
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/RelativeTimeGreaterThanMatchingRuleTest.java
@@ -34,8 +34,6 @@
@SuppressWarnings("javadoc")
@Test
public class RelativeTimeGreaterThanMatchingRuleTest extends MatchingRuleTest {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingRuleInvalidAttributeValues")
    public Object[][] createMatchingRuleInvalidAttributeValues() {
@@ -68,7 +66,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingrules")
    public Object[][] createMatchingRuleTest() {
@@ -103,7 +100,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    protected MatchingRule getRule() {
        return CoreSchema.getInstance().getMatchingRule(SchemaConstants.OMR_RELATIVE_TIME_GREATER_THAN_OID);
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/RelativeTimeLessThanMatchingRuleTest.java
@@ -34,8 +34,6 @@
@SuppressWarnings("javadoc")
@Test
public class RelativeTimeLessThanMatchingRuleTest extends MatchingRuleTest {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingRuleInvalidAttributeValues")
    public Object[][] createMatchingRuleInvalidAttributeValues() {
@@ -68,7 +66,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingrules")
    public Object[][] createMatchingRuleTest() {
@@ -104,7 +101,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    protected MatchingRule getRule() {
        return CoreSchema.getInstance().getMatchingRule(SchemaConstants.OMR_RELATIVE_TIME_LESS_THAN_OID);
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/SubstitutionSyntaxTestCase.java
@@ -12,7 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions copyright 2014 ForgeRock AS.
 * Portions copyright 2014-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -22,12 +22,9 @@
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
/**
 * Substitution syntax tests.
 */
/** Substitution syntax tests. */
@SuppressWarnings("javadoc")
public class SubstitutionSyntaxTestCase extends AbstractSyntaxTestCase {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "acceptableValues")
    public Object[][] createAcceptableValues() {
@@ -95,7 +92,6 @@
        Assert.assertFalse(builder.toSchema().getWarnings().isEmpty());
    }
    /** {@inheritDoc} */
    @Override
    protected Syntax getRule() {
        // Use IA5String syntax as our substitute.
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/TelephoneNumberSyntaxTest.java
@@ -11,7 +11,7 @@
 * Header, with the fields enclosed by brackets [] replaced by your own identifying
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2015 ForgeRock AS.
 * Copyright 2015-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -22,13 +22,9 @@
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
/**
 * Telephone number syntax tests.
 */
/** Telephone number syntax tests. */
@Test
public class TelephoneNumberSyntaxTest extends AbstractSyntaxTestCase {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "acceptableValues")
    public Object[][] createAcceptableValues() {
@@ -43,12 +39,10 @@
            { "", false } };
    }
    /** {@inheritDoc} */
    @Override
    protected Syntax getRule() {
        SchemaBuilder builder = new SchemaBuilder(getCoreSchema()).setOption(ALLOW_NON_STANDARD_TELEPHONE_NUMBERS,
                false);
        return builder.toSchema().getSyntax(SYNTAX_TELEPHONE_OID);
    }
}
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/TelexSyntaxTest.java
@@ -12,7 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions copyright 2014-2015 ForgeRock AS.
 * Portions copyright 2014-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -21,13 +21,9 @@
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
/**
 * Telex syntax tests.
 */
/** Telex syntax tests. */
@Test
public class TelexSyntaxTest extends AbstractSyntaxTestCase {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "acceptableValues")
    public Object[][] createAcceptableValues() {
@@ -37,10 +33,8 @@
            { "12345$67890$()+,-./:? ", true }, };
    }
    /** {@inheritDoc} */
    @Override
    protected Syntax getRule() {
        return Schema.getCoreSchema().getSyntax(SYNTAX_TELEX_OID);
    }
}
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/UTCTimeSyntaxTest.java
@@ -12,7 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions copyright 2012-2014 ForgeRock AS.
 * Portions copyright 2012-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -27,9 +27,7 @@
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
/**
 * UTC time syntax tests.
 */
/** UTC time syntax tests. */
public class UTCTimeSyntaxTest extends AbstractSyntaxTestCase {
    @Override
    @DataProvider(name = "acceptableValues")
@@ -167,7 +165,6 @@
        }
    }
    /** {@inheritDoc} */
    @Override
    protected Syntax getRule() {
        return Schema.getCoreSchema().getSyntax(SYNTAX_UTC_TIME_OID);
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/UUIDEqualityMatchingRuleTest.java
@@ -11,7 +11,7 @@
 * Header, with the fields enclosed by brackets [] replaced by your own identifying
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2014 ForgeRock AS.
 * Copyright 2014-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -20,12 +20,8 @@
import org.forgerock.opendj.ldap.ConditionResult;
import org.testng.annotations.DataProvider;
/**
 * Test the UUIDEqualityMatchingRule.
 */
/** Test the UUIDEqualityMatchingRule. */
public class UUIDEqualityMatchingRuleTest extends MatchingRuleTest {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingRuleInvalidAttributeValues")
    public Object[][] createMatchingRuleInvalidAttributeValues() {
@@ -37,7 +33,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingrules")
    public Object[][] createMatchingRuleTest() {
@@ -51,10 +46,8 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    protected MatchingRule getRule() {
        return Schema.getCoreSchema().getMatchingRule(EMR_UUID_OID);
    }
}
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/UUIDOrderingMatchingRuleTest.java
@@ -12,6 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions Copyright 2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -19,12 +20,8 @@
import org.testng.annotations.DataProvider;
/**
 * Test the UUIDOrderingMatchingRule.
 */
/** Test the UUIDOrderingMatchingRule. */
public class UUIDOrderingMatchingRuleTest extends OrderingMatchingRuleTest {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "OrderingMatchingRuleInvalidValues")
    public Object[][] createOrderingMatchingRuleInvalidValues() {
@@ -36,7 +33,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "Orderingmatchingrules")
    public Object[][] createOrderingMatchingRuleTestData() {
@@ -48,7 +44,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    protected MatchingRule getRule() {
        return Schema.getCoreSchema().getMatchingRule(OMR_UUID_OID);
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/UUIDSyntaxTest.java
@@ -12,7 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2009 Sun Microsystems, Inc.
 * Portions copyright 2014 ForgeRock AS.
 * Portions copyright 2014-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -21,12 +21,9 @@
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
/**
 * UUID syntax tests.
 */
/** UUID syntax tests. */
@Test
public class UUIDSyntaxTest extends AbstractSyntaxTestCase {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "acceptableValues")
    public Object[][] createAcceptableValues() {
@@ -44,7 +41,6 @@
            { "12345678-9abc-def0-1234-1234567890a", false }, };
    }
    /** {@inheritDoc} */
    @Override
    protected Syntax getRule() {
        return Schema.getCoreSchema().getSyntax(SYNTAX_UUID_OID);
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/UniqueMemberEqualityMatchingRuleTest.java
@@ -11,7 +11,7 @@
 * Header, with the fields enclosed by brackets [] replaced by your own identifying
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2014 ForgeRock AS.
 * Copyright 2014-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -21,13 +21,9 @@
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
/**
 * Test the UniqueMemberEqualityMatchingRule.
 */
/** Test the UniqueMemberEqualityMatchingRule. */
@Test
public class UniqueMemberEqualityMatchingRuleTest extends MatchingRuleTest {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingRuleInvalidAttributeValues")
    public Object[][] createMatchingRuleInvalidAttributeValues() {
@@ -36,7 +32,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingrules")
    public Object[][] createMatchingRuleTest() {
@@ -51,10 +46,8 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    protected MatchingRule getRule() {
        return Schema.getCoreSchema().getMatchingRule(EMR_UNIQUE_MEMBER_OID);
    }
}
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/UserPasswordExactEqualityMatchingRuleTest.java
@@ -11,7 +11,7 @@
 * Header, with the fields enclosed by brackets [] replaced by your own identifying
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2014 ForgeRock AS.
 * Copyright 2014-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -19,12 +19,8 @@
import org.testng.annotations.DataProvider;
/**
 * Test the UserPasswordExactEqualityMatchingRule.
 */
/** Test the UserPasswordExactEqualityMatchingRule. */
public class UserPasswordExactEqualityMatchingRuleTest extends MatchingRuleTest {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingRuleInvalidAttributeValues")
    public Object[][] createMatchingRuleInvalidAttributeValues() {
@@ -33,7 +29,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingrules")
    public Object[][] createMatchingRuleTest() {
@@ -42,10 +37,8 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    protected MatchingRule getRule() {
        return Schema.getCoreSchema().getMatchingRule(EMR_USER_PASSWORD_EXACT_OID);
    }
}
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/WordEqualityMatchingRuleTest.java
@@ -11,7 +11,7 @@
 * Header, with the fields enclosed by brackets [] replaced by your own identifying
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2014 ForgeRock AS.
 * Copyright 2014-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.schema;
@@ -20,12 +20,8 @@
import org.forgerock.opendj.ldap.ConditionResult;
import org.testng.annotations.DataProvider;
/**
 * Test the WordEqualityMatchingRule.
 */
/** Test the WordEqualityMatchingRule. */
public class WordEqualityMatchingRuleTest extends MatchingRuleTest {
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingRuleInvalidAttributeValues")
    public Object[][] createMatchingRuleInvalidAttributeValues() {
@@ -34,7 +30,6 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    @DataProvider(name = "matchingrules")
    public Object[][] createMatchingRuleTest() {
@@ -55,10 +50,8 @@
        };
    }
    /** {@inheritDoc} */
    @Override
    protected MatchingRule getRule() {
        return Schema.getCoreSchema().getMatchingRule(EMR_WORD_OID);
    }
}
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/spi/BasicTransportProvider.java
@@ -11,7 +11,7 @@
 * Header, with the fields enclosed by brackets [] replaced by your own identifying
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2013-2015 ForgeRock AS.
 * Copyright 2013-2016 ForgeRock AS.
 */
package org.forgerock.opendj.ldap.spi;
@@ -49,10 +49,8 @@
        return new BasicLDAPListener(address, factory, options);
    }
    /** {@inheritDoc} */
    @Override
    public String getName() {
        return "Basic";
    }
}
opendj-sdk/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateMessageFileMojo.java
@@ -47,27 +47,16 @@
import org.apache.maven.project.MavenProject;
import org.forgerock.i18n.LocalizableMessage;
/**
 * Generates an XML file of log messages found in properties files.
 */
/** Generates an XML file of log messages found in properties files. */
@Mojo(name = "generate-xml-messages-doc", defaultPhase = PRE_SITE)
public class GenerateMessageFileMojo extends AbstractMojo {
    /**
     * The Maven Project.
     */
    /** The Maven Project. */
    @Parameter(property = "project", readonly = true, required = true)
    private MavenProject project;
    /**
     * The tag of the locale for which to generate the documentation.
     */
    /** The tag of the locale for which to generate the documentation. */
    @Parameter(defaultValue = "en")
    private String locale;
    /**
     * The path to the directory containing the message properties files.
     */
    /** The path to the directory containing the message properties files. */
    @Parameter(required = true)
    private String messagesDirectory;
@@ -78,16 +67,11 @@
    @Parameter(required = true)
    private String outputDirectory;
    /**
     * A list which contains all file names, the extension is not needed.
     */
    /** A list which contains all file names, the extension is not needed. */
    @Parameter(required = true)
    private List<String> messageFileNames;
    /**
     * One-line descriptions for log reference categories.
     */
    private static final HashMap<String, LocalizableMessage> CATEGORY_DESCRIPTIONS = new HashMap<>();
    /** One-line descriptions for log reference categories. */
    private static final Map<String, LocalizableMessage> CATEGORY_DESCRIPTIONS = new HashMap<>();
    static {
        CATEGORY_DESCRIPTIONS.put("ACCESS_CONTROL", CATEGORY_ACCESS_CONTROL.get());
        CATEGORY_DESCRIPTIONS.put("ADMIN", CATEGORY_ADMIN.get());
@@ -116,7 +100,6 @@
    /** Message giving formatting rules for string keys. */
    public static final String KEY_FORM_MSG = ".\n\nOpenDJ message property keys must be of the form\n\n"
            + "\t\'[CATEGORY]_[SEVERITY]_[DESCRIPTION]_[ORDINAL]\'\n\n";
    private static final String ERROR_SEVERITY_IDENTIFIER_STRING = "ERR_";
    /** FreeMarker template configuration. */
@@ -151,17 +134,13 @@
        }
    }
    /**
     * Represents a log reference entry for an individual message.
     */
    /** Represents a log reference entry for an individual message. */
    private static class MessageRefEntry implements Comparable<MessageRefEntry> {
        private Integer ordinal;
        private String xmlId;
        private String formatString;
        /**
         * Build log reference entry for an log message.
         */
        /** Build log reference entry for an log message. */
        public MessageRefEntry(final String msgPropKey, final Integer ordinal, final String formatString) {
            this.formatString = formatString;
            this.ordinal = ordinal;
@@ -283,7 +262,6 @@
            return this.ordinal;
        }
        /** {@inheritDoc} */
        @Override
        public String toString() {
            if (ordinal != null) {
@@ -292,7 +270,6 @@
            return description;
        }
        /** {@inheritDoc} */
        @Override
        public int compareTo(MessagePropertyKey k) {
            if (ordinal == k.ordinal) {
opendj-sdk/opendj-grizzly/src/main/java/org/forgerock/opendj/grizzly/LDAPServerFilter.java
@@ -12,9 +12,8 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2010 Sun Microsystems, Inc.
 * Portions Copyright 2012-2015 ForgeRock AS.
 * Portions Copyright 2012-2016 ForgeRock AS.
 */
package org.forgerock.opendj.grizzly;
import java.io.IOException;
@@ -84,17 +83,13 @@
 */
final class LDAPServerFilter extends LDAPBaseFilter {
    /**
     * Provides an arbitrary write operation on a LDAP writer.
     */
    /** Provides an arbitrary write operation on a LDAP writer. */
    private interface LDAPWrite<T> {
        void perform(LDAPWriter<ASN1BufferWriter> writer, int messageID, T message)
                throws IOException;
    }
    /**
     * Write operation for intermediate responses.
     */
    /** Write operation for intermediate responses. */
    private static final LDAPWrite<IntermediateResponse> INTERMEDIATE =
            new LDAPWrite<IntermediateResponse>() {
                @Override
@@ -333,7 +328,6 @@
            }
        }
        /** {@inheritDoc} */
        @Override
        public String toString() {
            final StringBuilder builder = new StringBuilder();
@@ -463,7 +457,6 @@
        protected void writeResult(LDAPWriter<ASN1BufferWriter> writer, CompareResult result)
                throws IOException {
            writer.writeCompareResult(messageID, result);
        }
    }
@@ -628,9 +621,7 @@
    };
    // @formatter:on
    /**
     * Default maximum request size for incoming requests.
     */
    /** Default maximum request size for incoming requests. */
    private static final int DEFAULT_MAX_REQUEST_SIZE = 5 * 1024 * 1024;
    private static final Attribute<ClientContextImpl> LDAP_CONNECTION_ATTR =
@@ -662,7 +653,6 @@
    private static final class ServerRequestHandler extends AbstractLDAPMessageHandler implements
            LDAPBaseHandler {
        private final Connection<?> connection;
        private final LDAPReader<ASN1BufferReader> reader;
opendj-sdk/opendj-grizzly/src/test/java/org/forgerock/opendj/grizzly/GrizzlyLDAPListenerTestCase.java
@@ -12,7 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2010 Sun Microsystems, Inc.
 * Portions Copyright 2011-2015 ForgeRock AS.
 * Portions Copyright 2011-2016 ForgeRock AS.
 */
package org.forgerock.opendj.grizzly;
@@ -72,9 +72,7 @@
import static org.forgerock.util.Options.defaultOptions;
import static org.mockito.Mockito.*;
/**
 * Tests the LDAPListener class.
 */
/** Tests the LDAPListener class. */
@SuppressWarnings("javadoc")
public class GrizzlyLDAPListenerTestCase extends SdkTestCase {
@@ -87,14 +85,12 @@
            // Do nothing.
        }
        /** {@inheritDoc} */
        @Override
        public void handleAbandon(final Integer requestContext, final AbandonRequest request)
                throws UnsupportedOperationException {
            // Do nothing.
        }
        /** {@inheritDoc} */
        @Override
        public void handleAdd(final Integer requestContext, final AddRequest request,
                final IntermediateResponseHandler intermediateResponseHandler,
@@ -102,7 +98,6 @@
            resultHandler.handleResult(Responses.newResult(ResultCode.SUCCESS));
        }
        /** {@inheritDoc} */
        @Override
        public void handleBind(final Integer requestContext, final int version,
                final BindRequest request,
@@ -111,7 +106,6 @@
            resultHandler.handleResult(Responses.newBindResult(ResultCode.SUCCESS));
        }
        /** {@inheritDoc} */
        @Override
        public void handleCompare(final Integer requestContext, final CompareRequest request,
                final IntermediateResponseHandler intermediateResponseHandler,
@@ -120,25 +114,21 @@
            resultHandler.handleResult(Responses.newCompareResult(ResultCode.SUCCESS));
        }
        /** {@inheritDoc} */
        @Override
        public void handleConnectionClosed(final Integer requestContext, final UnbindRequest request) {
            isClosed.countDown();
        }
        /** {@inheritDoc} */
        @Override
        public void handleConnectionDisconnected(final ResultCode resultCode, final String message) {
            // Do nothing.
        }
        /** {@inheritDoc} */
        @Override
        public void handleConnectionError(final Throwable error) {
            connectionError.handleResult(error);
        }
        /** {@inheritDoc} */
        @Override
        public void handleDelete(final Integer requestContext, final DeleteRequest request,
                final IntermediateResponseHandler intermediateResponseHandler,
@@ -146,7 +136,6 @@
            resultHandler.handleResult(Responses.newResult(ResultCode.SUCCESS));
        }
        /** {@inheritDoc} */
        @Override
        public <R extends ExtendedResult> void handleExtendedRequest(final Integer requestContext,
                final ExtendedRequest<R> request,
@@ -157,7 +146,6 @@
                            "Extended operation " + request.getOID() + " not supported")));
        }
        /** {@inheritDoc} */
        @Override
        public void handleModify(final Integer requestContext, final ModifyRequest request,
                final IntermediateResponseHandler intermediateResponseHandler,
@@ -165,7 +153,6 @@
            resultHandler.handleResult(Responses.newResult(ResultCode.SUCCESS));
        }
        /** {@inheritDoc} */
        @Override
        public void handleModifyDN(final Integer requestContext, final ModifyDNRequest request,
                final IntermediateResponseHandler intermediateResponseHandler,
@@ -173,26 +160,22 @@
            resultHandler.handleResult(Responses.newResult(ResultCode.SUCCESS));
        }
        /** {@inheritDoc} */
        @Override
        public void handleSearch(final Integer requestContext, final SearchRequest request,
            final IntermediateResponseHandler intermediateResponseHandler, final SearchResultHandler entryHandler,
            final LdapResultHandler<Result> resultHandler) throws UnsupportedOperationException {
            resultHandler.handleResult(Responses.newResult(ResultCode.SUCCESS));
        }
    }
    private static class MockServerConnectionFactory implements
            ServerConnectionFactory<LDAPClientContext, Integer> {
        private final MockServerConnection serverConnection;
        private MockServerConnectionFactory(final MockServerConnection serverConnection) {
            this.serverConnection = serverConnection;
        }
        /** {@inheritDoc} */
        @Override
        public ServerConnection<Integer> handleAccept(final LDAPClientContext clientContext) throws LdapException {
            serverConnection.context.handleResult(clientContext);
@@ -200,25 +183,19 @@
        }
    }
    /**
     * Disables logging before the tests.
     */
    /** Disables logging before the tests. */
    @BeforeClass
    public void disableLogging() {
        TestCaseUtils.setDefaultLogLevel(Level.SEVERE);
    }
    /**
     * Re-enable logging after the tests.
     */
    /** Re-enable logging after the tests. */
    @AfterClass
    public void enableLogging() {
        TestCaseUtils.setDefaultLogLevel(Level.INFO);
    }
    /**
     * Test creation of LDAP listener with default transport provider.
     */
    /** Test creation of LDAP listener with default transport provider. */
    @SuppressWarnings("unchecked")
    @Test
    public void testCreateLDAPListener() throws Exception {
@@ -228,9 +205,7 @@
        listener.close();
    }
    /**
     * Test creation of LDAP listener with default transport provider and custom class loader.
     */
    /** Test creation of LDAP listener with default transport provider and custom class loader. */
    @SuppressWarnings("unchecked")
    @Test
    public void testCreateLDAPListenerWithCustomClassLoader() throws Exception {
@@ -242,11 +217,9 @@
        listener.close();
    }
    /**
     * Test creation of LDAP listener with unknown transport provider.
     */
    /** Test creation of LDAP listener with unknown transport provider. */
    @SuppressWarnings({ "unchecked" })
    @Test(expectedExceptions = { ProviderNotFoundException.class },
    @Test(expectedExceptions = ProviderNotFoundException.class,
        expectedExceptionsMessageRegExp = "^The requested provider 'unknown' .*")
    public void testCreateLDAPListenerFailureProviderNotFound() throws Exception {
        Options options = defaultOptions().set(TRANSPORT_PROVIDER, "unknown");
@@ -403,7 +376,6 @@
            final MockServerConnection proxyServerConnection = new MockServerConnection() {
                /** {@inheritDoc} */
                @Override
                public void handleBind(final Integer requestContext, final int version,
                        final BindRequest request,
@@ -555,7 +527,6 @@
        try {
            final MockServerConnection proxyServerConnection = new MockServerConnection() {
                /** {@inheritDoc} */
                @Override
                public void handleBind(final Integer requestContext, final int version,
                        final BindRequest request,
opendj-sdk/opendj-ldap-sdk-examples/src/main/java/org/forgerock/opendj/examples/ProxyBackend.java
@@ -89,7 +89,6 @@
        this.bindFactory = bindFactory;
    }
    /** {@inheritDoc} */
    @Override
    public void handleAdd(final RequestContext requestContext, final AddRequest request,
        final IntermediateResponseHandler intermediateResponseHandler, final LdapResultHandler<Result> resultHandler) {
@@ -105,7 +104,6 @@
        }).thenOnResult(resultHandler).thenOnException(resultHandler).thenAlways(close(connectionHolder));
    }
    /** {@inheritDoc} */
    @Override
    public void handleBind(final RequestContext requestContext, final int version, final BindRequest request,
        final IntermediateResponseHandler intermediateResponseHandler,
@@ -135,10 +133,8 @@
                        }
                    }).thenOnException(resultHandler).thenAlways(close(connectionHolder));
        }
    }
    /** {@inheritDoc} */
    @Override
    public void handleCompare(final RequestContext requestContext, final CompareRequest request,
            final IntermediateResponseHandler intermediateResponseHandler,
@@ -155,7 +151,6 @@
        }).thenOnResult(resultHandler).thenOnException(resultHandler).thenAlways(close(connectionHolder));
    }
    /** {@inheritDoc} */
    @Override
    public void handleDelete(final RequestContext requestContext, final DeleteRequest request,
            final IntermediateResponseHandler intermediateResponseHandler,
@@ -172,7 +167,6 @@
        }).thenOnResult(resultHandler).thenOnException(resultHandler).thenAlways(close(connectionHolder));
    }
    /** {@inheritDoc} */
    @Override
    public <R extends ExtendedResult> void handleExtendedRequest(final RequestContext requestContext,
        final ExtendedRequest<R> request, final IntermediateResponseHandler intermediateResponseHandler,
@@ -201,7 +195,6 @@
        }
    }
    /** {@inheritDoc} */
    @Override
    public void handleModify(final RequestContext requestContext, final ModifyRequest request,
            final IntermediateResponseHandler intermediateResponseHandler,
@@ -218,7 +211,6 @@
        }).thenOnResult(resultHandler).thenOnException(resultHandler).thenAlways(close(connectionHolder));
    }
    /** {@inheritDoc} */
    @Override
    public void handleModifyDN(final RequestContext requestContext, final ModifyDNRequest request,
        final IntermediateResponseHandler intermediateResponseHandler, final LdapResultHandler<Result> resultHandler) {
@@ -234,7 +226,6 @@
        }).thenOnResult(resultHandler).thenOnException(resultHandler).thenAlways(close(connectionHolder));
    }
    /** {@inheritDoc} */
    @Override
    public void handleSearch(final RequestContext requestContext, final SearchRequest request,
            final IntermediateResponseHandler intermediateResponseHandler, final SearchResultHandler entryHandler,
opendj-sdk/opendj-ldap-sdk-examples/src/main/java/org/forgerock/opendj/examples/SearchAsync.java
@@ -11,7 +11,7 @@
 * Header, with the fields enclosed by brackets [] replaced by your own identifying
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2015 ForgeRock AS.
 * Copyright 2015-2016 ForgeRock AS.
 */
package org.forgerock.opendj.examples;
@@ -51,7 +51,6 @@
public final class SearchAsync {
    // --- JCite search result handler ---
    private static final class SearchResultHandlerImpl implements SearchResultHandler {
        /** {@inheritDoc} */
        @Override
        public synchronized boolean handleEntry(final SearchResultEntry entry) {
            try {
@@ -91,7 +90,6 @@
            return true;
        }
        /** {@inheritDoc} */
        @Override
        public synchronized boolean handleReference(final SearchResultReference reference) {
            try {
opendj-sdk/opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/PerformanceRunner.java
@@ -206,7 +206,6 @@
    /** Thread local copies of the data sources. */
    private final ThreadLocal<DataSource[]> dataSources = new ThreadLocal<DataSource[]>() {
        /** {@inheritDoc} */
        @Override
        protected DataSource[] initialValue() {
            final DataSource[] prototypes = getDataSources();
@@ -226,9 +225,9 @@
    private int targetThroughput;
    private int maxIterations;
    /** Warm-up duration time in ms. **/
    /** Warm-up duration time in ms. */
    private long warmUpDurationMs;
    /** Max duration time in ms, 0 for unlimited. **/
    /** Max duration time in ms, 0 for unlimited. */
    private long maxDurationTimeMs;
    private boolean noRebind;
    private BindRequest bindRequest;
opendj-sdk/opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/RequestState.java
@@ -11,7 +11,7 @@
 * Header, with the fields enclosed by brackets [] replaced by your own identifying
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2013-2015 ForgeRock AS.
 * Copyright 2013-2016 ForgeRock AS.
 */
package org.forgerock.opendj.rest2ldap;
@@ -73,7 +73,7 @@
    private static final class CachedRead implements SearchResultHandler, LdapResultHandler<Result> {
        private SearchResultEntry cachedEntry;
        private final String cachedFilterString;
        /**  Guarded by cachedPromiseLatch.*/
        /** Guarded by cachedPromiseLatch. */
        private LdapPromise<Result> cachedPromise;
        private final CountDownLatch cachedPromiseLatch = new CountDownLatch(1);
        private final SearchRequest cachedRequest;
@@ -164,7 +164,6 @@
                searchResultHandler.handleEntry(cachedEntry);
            }
        }
    }
    /**
@@ -191,10 +190,7 @@
        this.config = config;
        this.context = context;
        /*
         * Re-use the pre-authenticated connection if available and the
         * authorization policy allows.
         */
        /* Re-use the pre-authenticated connection if available and the authorization policy allows. */
        if (config.getAuthorizationPolicy() != AuthorizationPolicy.NONE
                && context.containsContext(AuthenticatedConnectionContext.class)) {
            this.connection = wrap(context.asContext(AuthenticatedConnectionContext.class).getConnection());
@@ -203,7 +199,6 @@
        }
    }
    /** {@inheritDoc} */
    @Override
    public void close() {
        connection.close();
@@ -283,9 +278,7 @@
     * if needed.
     */
    private Connection wrap(final Connection connection) {
        /*
         * We only use async methods so no need to wrap sync methods.
         */
        /* We only use async methods so no need to wrap sync methods. */
        return new AbstractAsynchronousConnection() {
            @Override
            public LdapPromise<Void> abandonAsync(final AbandonRequest request) {
@@ -439,5 +432,4 @@
            }
        };
    }
}