From f2160f4bd1c8ac67e5a86a6710d431e8932877f9 Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Fri, 28 May 2010 11:47:51 +0000
Subject: [PATCH] Synchronize SDK on java.net with internal repository.
---
sdk/src/org/opends/sdk/schema/MatchingRuleUseSyntaxImpl.java | 46 +++++++++++++++++++++++++---------------------
1 files changed, 25 insertions(+), 21 deletions(-)
diff --git a/sdk/src/org/opends/sdk/schema/MatchingRuleUseSyntaxImpl.java b/sdk/src/org/opends/sdk/schema/MatchingRuleUseSyntaxImpl.java
index 4440012..9728454 100644
--- a/sdk/src/org/opends/sdk/schema/MatchingRuleUseSyntaxImpl.java
+++ b/sdk/src/org/opends/sdk/schema/MatchingRuleUseSyntaxImpl.java
@@ -29,8 +29,12 @@
-import static com.sun.opends.sdk.messages.Messages.*;
-import static org.opends.sdk.schema.SchemaConstants.*;
+import static com.sun.opends.sdk.messages.Messages.ERR_ATTR_SYNTAX_ILLEGAL_TOKEN;
+import static com.sun.opends.sdk.messages.Messages.ERR_ATTR_SYNTAX_MRUSE_EMPTY_VALUE;
+import static com.sun.opends.sdk.messages.Messages.ERR_ATTR_SYNTAX_MRUSE_EXPECTED_OPEN_PARENTHESIS;
+import static com.sun.opends.sdk.messages.Messages.ERR_ATTR_SYNTAX_MRUSE_NO_ATTR;
+import static org.opends.sdk.schema.SchemaConstants.EMR_OID_FIRST_COMPONENT_OID;
+import static org.opends.sdk.schema.SchemaConstants.SYNTAX_MATCHING_RULE_USE_NAME;
import java.util.Set;
@@ -45,9 +49,9 @@
/**
- * This class implements the matching rule use description syntax, which
- * is used to hold matching rule use definitions in the server schema.
- * The format of this syntax is defined in RFC 2252.
+ * This class implements the matching rule use description syntax, which is used
+ * to hold matching rule use definitions in the server schema. The format of
+ * this syntax is defined in RFC 2252.
*/
final class MatchingRuleUseSyntaxImpl extends AbstractSyntaxImpl
{
@@ -75,21 +79,21 @@
/**
- * Indicates whether the provided value is acceptable for use in an
- * attribute with this syntax. If it is not, then the reason may be
- * appended to the provided buffer.
- *
+ * Indicates whether the provided value is acceptable for use in an attribute
+ * with this syntax. If it is not, then the reason may be appended to the
+ * provided buffer.
+ *
* @param schema
* The schema in which this syntax is defined.
* @param value
* The value for which to make the determination.
* @param invalidReason
* The buffer to which the invalid reason should be appended.
- * @return <CODE>true</CODE> if the provided value is acceptable for
- * use with this syntax, or <CODE>false</CODE> if not.
+ * @return <CODE>true</CODE> if the provided value is acceptable for use with
+ * this syntax, or <CODE>false</CODE> if not.
*/
- public boolean valueIsAcceptable(Schema schema, ByteSequence value,
- LocalizableMessageBuilder invalidReason)
+ public boolean valueIsAcceptable(final Schema schema,
+ final ByteSequence value, final LocalizableMessageBuilder invalidReason)
{
// We'll use the decodeAttributeType method to determine if the
// value is acceptable.
@@ -106,7 +110,8 @@
{
// This means that the value was empty or contained only
// whitespace. That is illegal.
- final LocalizableMessage message = ERR_ATTR_SYNTAX_MRUSE_EMPTY_VALUE.get();
+ final LocalizableMessage message = ERR_ATTR_SYNTAX_MRUSE_EMPTY_VALUE
+ .get();
final DecodeException e = DecodeException.error(message);
StaticUtils.DEBUG_LOG.throwing("MatchingRuleUseSyntax",
"valueIsAcceptable", e);
@@ -118,9 +123,8 @@
final char c = reader.read();
if (c != '(')
{
- final LocalizableMessage message =
- ERR_ATTR_SYNTAX_MRUSE_EXPECTED_OPEN_PARENTHESIS.get(
- definition, (reader.pos() - 1), String.valueOf(c));
+ final LocalizableMessage message = ERR_ATTR_SYNTAX_MRUSE_EXPECTED_OPEN_PARENTHESIS
+ .get(definition, (reader.pos() - 1), String.valueOf(c));
final DecodeException e = DecodeException.error(message);
StaticUtils.DEBUG_LOG.throwing("MatchingRuleUseSyntax",
"valueIsAcceptable", e);
@@ -184,8 +188,8 @@
}
else
{
- final LocalizableMessage message =
- ERR_ATTR_SYNTAX_ILLEGAL_TOKEN.get(tokenName);
+ final LocalizableMessage message = ERR_ATTR_SYNTAX_ILLEGAL_TOKEN
+ .get(tokenName);
final DecodeException e = DecodeException.error(message);
StaticUtils.DEBUG_LOG.throwing("MatchingRuleUseSyntax",
"valueIsAcceptable", e);
@@ -196,8 +200,8 @@
// Make sure that the set of attributes was defined.
if (attributes == null || attributes.size() == 0)
{
- final LocalizableMessage message =
- ERR_ATTR_SYNTAX_MRUSE_NO_ATTR.get(definition);
+ final LocalizableMessage message = ERR_ATTR_SYNTAX_MRUSE_NO_ATTR
+ .get(definition);
final DecodeException e = DecodeException.error(message);
StaticUtils.DEBUG_LOG.throwing("MatchingRuleUseSyntax",
"valueIsAcceptable", e);
--
Gitblit v1.10.0