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/DeliveryMethodSyntaxImpl.java |   41 +++++++++++++++++++----------------------
 1 files changed, 19 insertions(+), 22 deletions(-)

diff --git a/sdk/src/org/opends/sdk/schema/DeliveryMethodSyntaxImpl.java b/sdk/src/org/opends/sdk/schema/DeliveryMethodSyntaxImpl.java
index 0eb0e27..bb621a9 100644
--- a/sdk/src/org/opends/sdk/schema/DeliveryMethodSyntaxImpl.java
+++ b/sdk/src/org/opends/sdk/schema/DeliveryMethodSyntaxImpl.java
@@ -29,8 +29,9 @@
 
 
 
-import static com.sun.opends.sdk.messages.Messages.*;
-import static com.sun.opends.sdk.util.StaticUtils.*;
+import static com.sun.opends.sdk.messages.Messages.ERR_ATTR_SYNTAX_DELIVERY_METHOD_INVALID_ELEMENT;
+import static com.sun.opends.sdk.messages.Messages.ERR_ATTR_SYNTAX_DELIVERY_METHOD_NO_ELEMENTS;
+import static com.sun.opends.sdk.util.StaticUtils.toLowerCase;
 import static org.opends.sdk.schema.SchemaConstants.*;
 
 import java.util.HashSet;
@@ -41,12 +42,11 @@
 
 
 
-
 /**
- * This class defines the delivery method attribute syntax. This
- * contains one or more of a fixed set of values. If there are multiple
- * values, then they are separated by spaces with a dollar sign between
- * them. The allowed values include:
+ * This class defines the delivery method attribute syntax. This contains one or
+ * more of a fixed set of values. If there are multiple values, then they are
+ * separated by spaces with a dollar sign between them. The allowed values
+ * include:
  * <UL>
  * <LI>any</LI>
  * <LI>mhs</LI>
@@ -65,8 +65,7 @@
   /**
    * The set of values that may be used as delivery methods.
    */
-  private static final HashSet<String> ALLOWED_VALUES =
-      new HashSet<String>();
+  private static final HashSet<String> ALLOWED_VALUES = new HashSet<String>();
   {
     ALLOWED_VALUES.add("any");
     ALLOWED_VALUES.add("mhs");
@@ -129,25 +128,24 @@
 
 
   /**
-   * 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)
   {
     final String stringValue = toLowerCase(value.toString());
-    final StringTokenizer tokenizer =
-        new StringTokenizer(stringValue, " $");
+    final StringTokenizer tokenizer = new StringTokenizer(stringValue, " $");
     if (!tokenizer.hasMoreTokens())
     {
       invalidReason.append(ERR_ATTR_SYNTAX_DELIVERY_METHOD_NO_ELEMENTS
@@ -160,9 +158,8 @@
       final String token = tokenizer.nextToken();
       if (!ALLOWED_VALUES.contains(token))
       {
-        invalidReason
-            .append(ERR_ATTR_SYNTAX_DELIVERY_METHOD_INVALID_ELEMENT
-                .get(value.toString(), token));
+        invalidReason.append(ERR_ATTR_SYNTAX_DELIVERY_METHOD_INVALID_ELEMENT
+            .get(value.toString(), token));
         return false;
       }
     }

--
Gitblit v1.10.0