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

Matthew Swift
15.56.2012 37197abf87d75b6071b2645f4b76c682895030a2
Minor simplifications and cleanup.
1 files modified
29 ■■■■ changed files
opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/Filter.java 29 ●●●● patch | view | raw | blame | history
opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/Filter.java
@@ -534,9 +534,7 @@
     * @return The newly created {@code approximate match} filter.
     */
    public static Filter approx(final String attributeDescription, final Object assertionValue) {
        Validator.ensureNotNull(attributeDescription, assertionValue);
        return new Filter(new ApproxMatchImpl(attributeDescription, ByteString
                .valueOf(assertionValue)));
        return approx(attributeDescription, ByteString.valueOf(assertionValue));
    }
    /**
@@ -568,9 +566,7 @@
     * @return The newly created {@code equality match} filter.
     */
    public static Filter equality(final String attributeDescription, final Object assertionValue) {
        Validator.ensureNotNull(attributeDescription, assertionValue);
        return new Filter(new EqualityMatchImpl(attributeDescription, ByteString
                .valueOf(assertionValue)));
        return equality(attributeDescription, ByteString.valueOf(assertionValue));
    }
    /**
@@ -617,11 +613,8 @@
     */
    public static Filter extensible(final String matchingRule, final String attributeDescription,
            final Object assertionValue, final boolean dnAttributes) {
        Validator.ensureTrue((matchingRule != null) || (attributeDescription != null),
                "matchingRule and/or " + "attributeDescription must not be null");
        Validator.ensureNotNull(assertionValue);
        return new Filter(new ExtensibleMatchImpl(matchingRule, attributeDescription, ByteString
                .valueOf(assertionValue), dnAttributes));
        return extensible(matchingRule, attributeDescription, ByteString.valueOf(assertionValue),
                dnAttributes);
    }
    /**
@@ -655,9 +648,7 @@
     */
    public static Filter greaterOrEqual(final String attributeDescription,
            final Object assertionValue) {
        Validator.ensureNotNull(attributeDescription, assertionValue);
        return new Filter(new GreaterOrEqualImpl(attributeDescription, ByteString
                .valueOf(assertionValue)));
        return greaterOrEqual(attributeDescription, ByteString.valueOf(assertionValue));
    }
    /**
@@ -690,9 +681,7 @@
     * @return The newly created {@code less or equal} filter.
     */
    public static Filter lessOrEqual(final String attributeDescription, final Object assertionValue) {
        Validator.ensureNotNull(attributeDescription, assertionValue);
        return new Filter(new LessOrEqualImpl(attributeDescription, ByteString
                .valueOf(assertionValue)));
        return lessOrEqual(attributeDescription, ByteString.valueOf(assertionValue));
    }
    /**
@@ -943,8 +932,7 @@
                }
            } else {
                // We tolerate the top level filter component not being
                // surrounded
                // by parentheses.
                // surrounded by parentheses.
                return valueOf0(string, 0, string.length());
            }
        } catch (final LocalizedIllegalArgumentException liae) {
@@ -1016,8 +1004,7 @@
        }
        // Finally, see if there is anything after the last asterisk, which
        // would be
        // the subFinal value.
        // would be the subFinal value.
        ByteString subFinal;
        if (firstPos == (valueBytes.length - 1)) {
            subFinal = null;