From 76c87042a9fb3ac7f1a25cc9d836da521eb8547f Mon Sep 17 00:00:00 2001
From: sin <sin@localhost>
Date: Tue, 17 Feb 2009 16:11:27 +0000
Subject: [PATCH] issue# 3774: Sort control doesn't work for collation matching rules

---
 opends/src/server/org/opends/server/schema/OctetStringOrderingMatchingRule.java |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/opends/src/server/org/opends/server/schema/OctetStringOrderingMatchingRule.java b/opends/src/server/org/opends/server/schema/OctetStringOrderingMatchingRule.java
index 7f02b59..f831724 100644
--- a/opends/src/server/org/opends/server/schema/OctetStringOrderingMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/OctetStringOrderingMatchingRule.java
@@ -22,7 +22,7 @@
  * CDDL HEADER END
  *
  *
- *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Copyright 2006-2009 Sun Microsystems, Inc.
  */
 package org.opends.server.schema;
 
@@ -33,6 +33,7 @@
 import java.util.Collection;
 import java.util.Collections;
 
+import org.opends.server.api.AbstractMatchingRule;
 import org.opends.server.api.OrderingMatchingRule;
 import org.opends.server.types.ByteSequence;
 import org.opends.server.types.ByteString;
@@ -47,7 +48,8 @@
  * octet string syntaxes.
  */
 class OctetStringOrderingMatchingRule
-       extends OrderingMatchingRule
+       extends AbstractMatchingRule
+       implements OrderingMatchingRule
 {
   /**
    * The serial version identifier required to satisfy the compiler because this
@@ -169,10 +171,9 @@
    *          ascending order, or zero if there is no difference between the
    *          values with regard to ordering.
    */
-  @Override
   public int compareValues(ByteSequence value1, ByteSequence value2)
   {
-    return StaticUtils.compare(value1, value2);
+    return value1.compareTo(value2);
   }
 
 
@@ -193,6 +194,6 @@
   public int compare(byte[] b1, byte[] b2)
   {
     return StaticUtils.compare(b1, b2);
-  }
+}
 }
 

--
Gitblit v1.10.0