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/TimeBasedMatchingRuleFactory.java | 55 +++++++++----------------------------------------------
1 files changed, 9 insertions(+), 46 deletions(-)
diff --git a/opendj3-server-dev/src/server/org/opends/server/schema/TimeBasedMatchingRuleFactory.java b/opendj3-server-dev/src/server/org/opends/server/schema/TimeBasedMatchingRuleFactory.java
index cee1ccf..dd10e8d 100644
--- a/opendj3-server-dev/src/server/org/opends/server/schema/TimeBasedMatchingRuleFactory.java
+++ b/opendj3-server-dev/src/server/org/opends/server/schema/TimeBasedMatchingRuleFactory.java
@@ -473,15 +473,7 @@
ByteSequence assertionValue)
{
int ret = compareValues(attributeValue, assertionValue);
-
- if (ret > 0)
- {
- return ConditionResult.TRUE;
- }
- else
- {
- return ConditionResult.FALSE;
- }
+ return ConditionResult.valueOf(ret > 0);
}
@@ -561,15 +553,7 @@
ByteSequence assertionValue)
{
int ret = compareValues(attributeValue, assertionValue);
-
- if (ret < 0)
- {
- return ConditionResult.TRUE;
- }
- else
- {
- return ConditionResult.FALSE;
- }
+ return ConditionResult.valueOf(ret < 0);
}
@@ -1048,37 +1032,16 @@
int assertMonth = bb.getInt(16);
int assertYear = bb.getInt(20);
- if(assertSecond != -1 && assertSecond !=second)
+ if ((assertSecond != -1 && assertSecond != second)
+ || (assertMinute != -1 && assertMinute != minute)
+ || (assertHour != -1 && assertHour != hour)
+ // All the non-zero values should match.
+ || (assertDate != 0 && assertDate != date)
+ || (assertMonth != -1 && assertMonth != month)
+ || (assertYear != 0 && assertYear != year))
{
return ConditionResult.FALSE;
}
-
- if(assertMinute !=-1 && assertMinute !=minute)
- {
- return ConditionResult.FALSE;
- }
-
- if(assertHour !=-1 && assertHour !=hour)
- {
- return ConditionResult.FALSE;
- }
-
- //All the non-zero values should match.
- if(assertDate !=0 && assertDate != date)
- {
- return ConditionResult.FALSE;
- }
-
- if(assertMonth !=-1 && assertMonth != month)
- {
- return ConditionResult.FALSE;
- }
-
- if(assertYear !=0 && assertYear != year)
- {
- return ConditionResult.FALSE;
- }
-
return ConditionResult.TRUE;
}
--
Gitblit v1.10.0