From 98d6b371c685e963b8d0513513c09661e5f2f391 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Wed, 02 Apr 2014 07:36:40 +0000
Subject: [PATCH] AbstractOrderingMatchingRuleImpl.java: Added a comment about the getXXXAssertion() methods after CR-3308.

---
 opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/AbstractOrderingMatchingRuleImpl.java |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/AbstractOrderingMatchingRuleImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/AbstractOrderingMatchingRuleImpl.java
index 897eea9..c069988 100644
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/AbstractOrderingMatchingRuleImpl.java
+++ b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/AbstractOrderingMatchingRuleImpl.java
@@ -40,6 +40,10 @@
 /**
  * This class implements a default ordering matching rule that matches
  * normalized values in byte order.
+ * <p>
+ * The getXXXAssertion() methods are default implementations which assume that
+ * the assertion syntax is the same as the attribute syntax. Override them if
+ * this assumption does not hold true.
  */
 abstract class AbstractOrderingMatchingRuleImpl extends AbstractMatchingRuleImpl {
 
@@ -50,10 +54,13 @@
         // Nothing to do.
     }
 
+    /** {@inheritDoc} */
+    @Override
     public Assertion getAssertion(final Schema schema, final ByteSequence value)
             throws DecodeException {
         final ByteString normAssertion = normalizeAttributeValue(schema, value);
         return new Assertion() {
+            @Override
             public ConditionResult matches(final ByteSequence attributeValue) {
                 return ConditionResult.valueOf(attributeValue.compareTo(normAssertion) < 0);
             }
@@ -65,11 +72,13 @@
         };
     }
 
+    /** {@inheritDoc} */
     @Override
     public Assertion getGreaterOrEqualAssertion(final Schema schema, final ByteSequence value)
             throws DecodeException {
         final ByteString normAssertion = normalizeAttributeValue(schema, value);
         return new Assertion() {
+            @Override
             public ConditionResult matches(final ByteSequence normalizedAttributeValue) {
                 return ConditionResult.valueOf(normalizedAttributeValue.compareTo(normAssertion) >= 0);
             }
@@ -81,11 +90,13 @@
         };
     }
 
+    /** {@inheritDoc} */
     @Override
     public Assertion getLessOrEqualAssertion(final Schema schema, final ByteSequence value)
             throws DecodeException {
         final ByteString normAssertion = normalizeAttributeValue(schema, value);
         return new Assertion() {
+            @Override
             public ConditionResult matches(final ByteSequence normalizedAttributeValue) {
                 return ConditionResult.valueOf(normalizedAttributeValue.compareTo(normAssertion) <= 0);
             }

--
Gitblit v1.10.0