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/BitStringEqualityMatchingRuleImpl.java | 32 +++++++++++++++-----------------
1 files changed, 15 insertions(+), 17 deletions(-)
diff --git a/sdk/src/org/opends/sdk/schema/BitStringEqualityMatchingRuleImpl.java b/sdk/src/org/opends/sdk/schema/BitStringEqualityMatchingRuleImpl.java
index 23293b1..d54d865 100644
--- a/sdk/src/org/opends/sdk/schema/BitStringEqualityMatchingRuleImpl.java
+++ b/sdk/src/org/opends/sdk/schema/BitStringEqualityMatchingRuleImpl.java
@@ -28,7 +28,9 @@
-import static com.sun.opends.sdk.messages.Messages.*;
+import static com.sun.opends.sdk.messages.Messages.WARN_ATTR_SYNTAX_BIT_STRING_INVALID_BIT;
+import static com.sun.opends.sdk.messages.Messages.WARN_ATTR_SYNTAX_BIT_STRING_NOT_QUOTED;
+import static com.sun.opends.sdk.messages.Messages.WARN_ATTR_SYNTAX_BIT_STRING_TOO_SHORT;
import org.opends.sdk.ByteSequence;
import org.opends.sdk.ByteString;
@@ -37,33 +39,30 @@
-
/**
- * This class defines the bitStringMatch matching rule defined in X.520
- * and referenced in RFC 2252.
+ * This class defines the bitStringMatch matching rule defined in X.520 and
+ * referenced in RFC 2252.
*/
-final class BitStringEqualityMatchingRuleImpl extends
- AbstractMatchingRuleImpl
+final class BitStringEqualityMatchingRuleImpl extends AbstractMatchingRuleImpl
{
- public ByteString normalizeAttributeValue(Schema schema,
- ByteSequence value) throws DecodeException
+ public ByteString normalizeAttributeValue(final Schema schema,
+ final ByteSequence value) throws DecodeException
{
final String valueString = value.toString().toUpperCase();
final int length = valueString.length();
if (length < 3)
{
- final LocalizableMessage message =
- WARN_ATTR_SYNTAX_BIT_STRING_TOO_SHORT.get(value.toString());
+ final LocalizableMessage message = WARN_ATTR_SYNTAX_BIT_STRING_TOO_SHORT
+ .get(value.toString());
throw DecodeException.error(message);
}
- if (valueString.charAt(0) != '\''
- || valueString.charAt(length - 2) != '\''
+ if (valueString.charAt(0) != '\'' || valueString.charAt(length - 2) != '\''
|| valueString.charAt(length - 1) != 'B')
{
- final LocalizableMessage message =
- WARN_ATTR_SYNTAX_BIT_STRING_NOT_QUOTED.get(value.toString());
+ final LocalizableMessage message = WARN_ATTR_SYNTAX_BIT_STRING_NOT_QUOTED
+ .get(value.toString());
throw DecodeException.error(message);
}
@@ -76,9 +75,8 @@
// These characters are fine.
break;
default:
- final LocalizableMessage message =
- WARN_ATTR_SYNTAX_BIT_STRING_INVALID_BIT.get(value
- .toString(), String.valueOf(valueString.charAt(i)));
+ final LocalizableMessage message = WARN_ATTR_SYNTAX_BIT_STRING_INVALID_BIT
+ .get(value.toString(), String.valueOf(valueString.charAt(i)));
throw DecodeException.error(message);
}
}
--
Gitblit v1.10.0