From fd650a8fd632005824a2e64d78549992ee9ffda0 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Fri, 14 Feb 2014 13:15:52 +0000
Subject: [PATCH] OPENDJ-1308 Migrate schema support

---
 opendj3-server-dev/src/server/org/opends/server/schema/CollationMatchingRuleFactory.java |   49 +++++--------------------------------------------
 1 files changed, 5 insertions(+), 44 deletions(-)

diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/CollationMatchingRuleFactory.java b/opendj3-server-dev/src/server/org/opends/server/schema/CollationMatchingRuleFactory.java
index eeba88f..ad9d6ab 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/CollationMatchingRuleFactory.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/CollationMatchingRuleFactory.java
@@ -875,14 +875,7 @@
     public ConditionResult valuesMatch(ByteSequence attributeValue,
         ByteSequence assertionValue)
     {
-      if (assertionValue.equals(attributeValue))
-      {
-        return ConditionResult.TRUE;
-      }
-      else
-      {
-        return ConditionResult.FALSE;
-      }
+      return ConditionResult.valueOf(assertionValue.equals(attributeValue));
     }
 
 
@@ -1779,15 +1772,7 @@
         ByteSequence assertionValue)
     {
       int ret = attributeValue.compareTo(assertionValue);
-
-      if (ret < 0)
-      {
-        return ConditionResult.TRUE;
-      }
-      else
-      {
-        return ConditionResult.FALSE;
-      }
+      return ConditionResult.valueOf(ret < 0);
     }
 
 
@@ -1847,15 +1832,7 @@
         ByteSequence assertionValue)
     {
       int ret = attributeValue.compareTo(assertionValue);
-
-      if (ret <= 0)
-      {
-        return ConditionResult.TRUE;
-      }
-      else
-      {
-        return ConditionResult.FALSE;
-      }
+      return ConditionResult.valueOf(ret <= 0);
     }
 
 
@@ -1916,15 +1893,7 @@
         ByteSequence assertionValue)
     {
       int ret = attributeValue.compareTo(assertionValue);
-
-      if (ret > 0)
-      {
-        return ConditionResult.TRUE;
-      }
-      else
-      {
-        return ConditionResult.FALSE;
-      }
+      return ConditionResult.valueOf(ret > 0);
     }
 
 
@@ -1984,15 +1953,7 @@
         ByteSequence assertionValue)
     {
       int ret = attributeValue.compareTo(assertionValue);
-
-      if (ret >= 0)
-      {
-        return ConditionResult.TRUE;
-      }
-      else
-      {
-        return ConditionResult.FALSE;
-      }
+      return ConditionResult.valueOf(ret >= 0);
     }
 
 

--
Gitblit v1.10.0