From e3ce4910af53462b22a5f98f6719935964ae43ee Mon Sep 17 00:00:00 2001
From: sin <sin@localhost>
Date: Mon, 13 Jul 2009 17:25:15 +0000
Subject: [PATCH] issue# 4113: Collation matching rules aren't displayed correctly while searching
---
opends/src/server/org/opends/server/schema/CollationMatchingRuleFactory.java | 21 ++++++++-------------
1 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/opends/src/server/org/opends/server/schema/CollationMatchingRuleFactory.java b/opends/src/server/org/opends/server/schema/CollationMatchingRuleFactory.java
index f0247d3..faaf3ed 100644
--- a/opends/src/server/org/opends/server/schema/CollationMatchingRuleFactory.java
+++ b/opends/src/server/org/opends/server/schema/CollationMatchingRuleFactory.java
@@ -530,21 +530,22 @@
String nOID = mapper.getNumericOID();
MatchingRule matchingRule = getMatchingRule(nOID);
- Collection<String> names = new HashSet<String>();
+ Collection<String> defaultNames = new HashSet<String>();
if (matchingRule != null)
{
for (String name : matchingRule.getAllNames())
{
- names.add(name);
+ defaultNames.add(name);
}
}
- names.add(lTag);
+ defaultNames.add(lTag);
matchingRule =
- new CollationEqualityMatchingRule(nOID, Collections
- .<String> emptySet(), locale);
+ new CollationEqualityMatchingRule(nOID,
+ defaultNames, locale);
addMatchingRule(nOID, matchingRule);
+ Collection<String> names = new HashSet<String>();
// Register OID.3 as the equality matching rule.
String OID = mapper.getNumericOID() + ".3";
MatchingRule equalityMatchingRule = getMatchingRule(OID);
@@ -772,14 +773,8 @@
@Override
public String getName()
{
- // Concatenate all the names and return.
- StringBuilder builder = new StringBuilder();
- for (String name : getAllNames())
- {
- builder.append(name);
- builder.append("\b");
- }
- return builder.toString();
+ //This is called when there is only 1 name.
+ return names.iterator().next();
}
--
Gitblit v1.10.0