From d8475ffa48cc7a7ecdca78295bf2ce42c6042e48 Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Fri, 17 Jun 2011 15:55:07 +0000
Subject: [PATCH] Initial work for OPENDJ-155: Add support for OpenDJ extended matching rules and syntaxes
---
opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/schema/MatchingRuleSyntaxImpl.java | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/schema/MatchingRuleSyntaxImpl.java b/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/schema/MatchingRuleSyntaxImpl.java
index 94d28e0..6f00952 100644
--- a/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/schema/MatchingRuleSyntaxImpl.java
+++ b/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/schema/MatchingRuleSyntaxImpl.java
@@ -92,9 +92,9 @@
{
// We'll use the decodeMatchingRule method to determine if the value
// is acceptable.
+ final String definition = value.toString();
try
{
- final String definition = value.toString();
final SubstringReader reader = new SubstringReader(definition);
// We'll do this a character at a time. First, skip over any
@@ -105,7 +105,8 @@
{
// This means that the value was empty or contained only
// whitespace. That is illegal.
- final LocalizableMessage message = ERR_ATTR_SYNTAX_MR_EMPTY_VALUE.get();
+ final LocalizableMessage message = ERR_ATTR_SYNTAX_MR_EMPTY_VALUE1
+ .get(definition);
final DecodeException e = DecodeException.error(message);
StaticUtils.DEBUG_LOG.throwing("MatchingRuleSyntax",
"valueIsAcceptable", e);
@@ -185,8 +186,8 @@
}
else
{
- final LocalizableMessage message = ERR_ATTR_SYNTAX_ILLEGAL_TOKEN
- .get(tokenName);
+ final LocalizableMessage message = ERR_ATTR_SYNTAX_MR_ILLEGAL_TOKEN1
+ .get(definition, tokenName);
final DecodeException e = DecodeException.error(message);
StaticUtils.DEBUG_LOG.throwing("MatchingRuleSyntax",
"valueIsAcceptable", e);
@@ -208,7 +209,8 @@
}
catch (final DecodeException de)
{
- invalidReason.append(de.getMessageObject());
+ invalidReason.append(ERR_ATTR_SYNTAX_MR_INVALID1.get(definition,
+ de.getMessageObject()));
return false;
}
}
--
Gitblit v1.10.0