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

Matthew Swift
21.32.2012 0e52d359d661d2fd95fa5c28058353f5d121173c
opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/requests/Requests.java
@@ -209,6 +209,9 @@
    /**
     * Creates a new compare request using the provided distinguished name,
     * attribute name, and assertion value.
     * <p>
     * If the assertion value is not an instance of {@code ByteString} then it
     * will be converted using the {@link ByteString#valueOf(Object)} method.
     *
     * @param name
     *            The distinguished name of the entry to be compared.
@@ -222,9 +225,10 @@
     *             {@code assertionValue} was {@code null}.
     */
    public static CompareRequest newCompareRequest(final DN name,
            final AttributeDescription attributeDescription, final ByteString assertionValue) {
            final AttributeDescription attributeDescription, final Object assertionValue) {
        Validator.ensureNotNull(name, attributeDescription, assertionValue);
        return new CompareRequestImpl(name, attributeDescription, assertionValue);
        return new CompareRequestImpl(name, attributeDescription, ByteString
                .valueOf(assertionValue));
    }
    /**
@@ -443,12 +447,15 @@
     */
    public static GenericExtendedRequest newGenericExtendedRequest(final String requestName) {
        Validator.ensureNotNull(requestName);
        return new GenericExtendedRequestImpl(requestName, null);
        return new GenericExtendedRequestImpl(requestName);
    }
    /**
     * Creates a new generic extended request using the provided name and
     * optional value.
     * <p>
     * If the request value is not an instance of {@code ByteString} then it
     * will be converted using the {@link ByteString#valueOf(Object)} method.
     *
     * @param requestName
     *            The dotted-decimal representation of the unique OID
@@ -462,9 +469,9 @@
     *             If {@code requestName} was {@code null}.
     */
    public static GenericExtendedRequest newGenericExtendedRequest(final String requestName,
            final ByteString requestValue) {
            final Object requestValue) {
        Validator.ensureNotNull(requestName);
        return new GenericExtendedRequestImpl(requestName, requestValue);
        return new GenericExtendedRequestImpl(requestName).setValue(requestValue);
    }
    /**