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/NameFormSyntaxImpl.java | 55 +++++++++++++++++++++++++++----------------------------
1 files changed, 27 insertions(+), 28 deletions(-)
diff --git a/sdk/src/org/opends/sdk/schema/NameFormSyntaxImpl.java b/sdk/src/org/opends/sdk/schema/NameFormSyntaxImpl.java
index e57f3dd..74d50f5 100644
--- a/sdk/src/org/opends/sdk/schema/NameFormSyntaxImpl.java
+++ b/sdk/src/org/opends/sdk/schema/NameFormSyntaxImpl.java
@@ -30,7 +30,8 @@
import static com.sun.opends.sdk.messages.Messages.*;
-import static org.opends.sdk.schema.SchemaConstants.*;
+import static org.opends.sdk.schema.SchemaConstants.EMR_OID_FIRST_COMPONENT_OID;
+import static org.opends.sdk.schema.SchemaConstants.SYNTAX_NAME_FORM_NAME;
import java.util.Set;
@@ -45,9 +46,9 @@
/**
- * This class implements the name form description syntax, which is used
- * to hold name form definitions in the server schema. The format of
- * this syntax is defined in RFC 2252.
+ * This class implements the name form description syntax, which is used to hold
+ * name form definitions in the server schema. The format of this syntax is
+ * defined in RFC 2252.
*/
final class NameFormSyntaxImpl extends AbstractSyntaxImpl
{
@@ -74,8 +75,8 @@
- 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 decodeNameForm method to determine if the value is
// acceptable.
@@ -92,11 +93,11 @@
{
// This means that the value was empty or contained only
// whitespace. That is illegal.
- final LocalizableMessage message =
- ERR_ATTR_SYNTAX_NAME_FORM_EMPTY_VALUE.get();
+ final LocalizableMessage message = ERR_ATTR_SYNTAX_NAME_FORM_EMPTY_VALUE
+ .get();
final DecodeException e = DecodeException.error(message);
- StaticUtils.DEBUG_LOG.throwing("NameFormSyntax",
- "valueIsAcceptable", e);
+ StaticUtils.DEBUG_LOG
+ .throwing("NameFormSyntax", "valueIsAcceptable", e);
throw e;
}
@@ -105,12 +106,11 @@
final char c = reader.read();
if (c != '(')
{
- final LocalizableMessage message =
- ERR_ATTR_SYNTAX_NAME_FORM_EXPECTED_OPEN_PARENTHESIS.get(
- definition, (reader.pos() - 1), c);
+ final LocalizableMessage message = ERR_ATTR_SYNTAX_NAME_FORM_EXPECTED_OPEN_PARENTHESIS
+ .get(definition, (reader.pos() - 1), c);
final DecodeException e = DecodeException.error(message);
- StaticUtils.DEBUG_LOG.throwing("NameFormSyntax",
- "valueIsAcceptable", e);
+ StaticUtils.DEBUG_LOG
+ .throwing("NameFormSyntax", "valueIsAcceptable", e);
throw e;
}
@@ -181,11 +181,11 @@
}
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("NameFormSyntax",
- "valueIsAcceptable", e);
+ StaticUtils.DEBUG_LOG.throwing("NameFormSyntax", "valueIsAcceptable",
+ e);
throw e;
}
}
@@ -194,22 +194,21 @@
// it cannot be valid.
if (structuralClass == null)
{
- final LocalizableMessage message =
- ERR_ATTR_SYNTAX_NAME_FORM_NO_STRUCTURAL_CLASS
- .get(definition);
+ final LocalizableMessage message = ERR_ATTR_SYNTAX_NAME_FORM_NO_STRUCTURAL_CLASS
+ .get(definition);
final DecodeException e = DecodeException.error(message);
- StaticUtils.DEBUG_LOG.throwing("NameFormSyntax",
- "valueIsAcceptable", e);
+ StaticUtils.DEBUG_LOG
+ .throwing("NameFormSyntax", "valueIsAcceptable", e);
throw e;
}
if (requiredAttributes == null || requiredAttributes.size() == 0)
{
- final LocalizableMessage message =
- ERR_ATTR_SYNTAX_NAME_FORM_NO_REQUIRED_ATTR.get(definition);
+ final LocalizableMessage message = ERR_ATTR_SYNTAX_NAME_FORM_NO_REQUIRED_ATTR
+ .get(definition);
final DecodeException e = DecodeException.error(message);
- StaticUtils.DEBUG_LOG.throwing("NameFormSyntax",
- "valueIsAcceptable", e);
+ StaticUtils.DEBUG_LOG
+ .throwing("NameFormSyntax", "valueIsAcceptable", e);
throw e;
}
return true;
--
Gitblit v1.10.0