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

Jean-Noel Rouvignac
30.52.2014 4a708f71d4f166cc314b32954322527852819f6c
Fixed broken test ChangeNumberIndexerTest.emptyDBTwoDSsDifferentDomains().

RDN.java:
In compare(), changed the code to match trunk code's behaviour when the MatchingRule is null.
1 files modified
16 ■■■■■ changed files
opendj3-server-dev/src/server/org/opends/server/types/RDN.java 16 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/types/RDN.java
@@ -1186,19 +1186,21 @@
    final MatchingRule orderingRule = type.getOrderingMatchingRule();
    final MatchingRule rule = orderingRule != null ? orderingRule : type.getEqualityMatchingRule();
    ByteString val1;
    ByteString val2;
    ByteString val1 = value1;
    ByteString val2 = value2;
    if (rule != null)
    {
    try
    {
      val1 = rule.normalizeAttributeValue(value1);
      val2 = rule.normalizeAttributeValue(value2);
        val1 = rule.normalizeAttributeValue(val1);
        val2 = rule.normalizeAttributeValue(val2);
        return rule.comparator().compare(val1, val2);
    }
    catch (DecodeException e)
    {
      logger.traceException(e);
      val1 = value1;
      val2 = value2;
    }
    return rule.comparator().compare(val1, val2);
    }
    return val1.toString().compareTo(val2.toString());
  }
}