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

Nicolas Capponi
05.30.2014 f782991655763d704279e38bccb4a0eabc03c646
OPENDJ-1581 CR-5092 Move Assertion.DEFAULT_COMPARATOR constant
to better suited ByteSequence interface
3 files modified
21 ■■■■ changed files
opendj-core/src/main/java/org/forgerock/opendj/ldap/Assertion.java 10 ●●●●● patch | view | raw | blame | history
opendj-core/src/main/java/org/forgerock/opendj/ldap/ByteSequence.java 9 ●●●●● patch | view | raw | blame | history
opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/AbstractMatchingRuleImpl.java 2 ●●● patch | view | raw | blame | history
opendj-core/src/main/java/org/forgerock/opendj/ldap/Assertion.java
@@ -27,8 +27,6 @@
package org.forgerock.opendj.ldap;
import java.util.Comparator;
import org.forgerock.opendj.ldap.spi.IndexQueryFactory;
/**
@@ -51,14 +49,6 @@
        }
    };
    /** A default ByteSequence comparator. */
    public static final Comparator<ByteSequence> DEFAULT_COMPARATOR = new Comparator<ByteSequence>() {
        @Override
        public int compare(final ByteSequence o1, final ByteSequence o2) {
            return o1.compareTo(o2);
        }
    };
    /**
     * Indicates whether the provided attribute value should be considered a
     * match for this assertion value according to the matching rule.
opendj-core/src/main/java/org/forgerock/opendj/ldap/ByteSequence.java
@@ -28,6 +28,7 @@
import java.io.IOException;
import java.io.OutputStream;
import java.util.Comparator;
/**
 * A {@code ByteSequence} is a readable sequence of byte values. This interface
@@ -35,6 +36,14 @@
 */
public interface ByteSequence extends Comparable<ByteSequence> {
    /** A default ByteSequence comparator. */
    public static final Comparator<ByteSequence> DEFAULT_COMPARATOR = new Comparator<ByteSequence>() {
        @Override
        public int compare(final ByteSequence o1, final ByteSequence o2) {
            return o1.compareTo(o2);
        }
    };
    /**
     * Returns a {@link ByteSequenceReader} which can be used to incrementally
     * read and decode data from this byte sequence.
opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/AbstractMatchingRuleImpl.java
@@ -106,7 +106,7 @@
    @Override
    public Comparator<ByteSequence> comparator(final Schema schema) {
        return DEFAULT_COMPARATOR;
        return ByteSequence.DEFAULT_COMPARATOR;
    }
    @Override