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/ObjectIdentifierEqualityMatchingRuleImpl.java |   42 ++++++++++++++++++------------------------
 1 files changed, 18 insertions(+), 24 deletions(-)

diff --git a/sdk/src/org/opends/sdk/schema/ObjectIdentifierEqualityMatchingRuleImpl.java b/sdk/src/org/opends/sdk/schema/ObjectIdentifierEqualityMatchingRuleImpl.java
index a18c600..c3bb105 100644
--- a/sdk/src/org/opends/sdk/schema/ObjectIdentifierEqualityMatchingRuleImpl.java
+++ b/sdk/src/org/opends/sdk/schema/ObjectIdentifierEqualityMatchingRuleImpl.java
@@ -36,11 +36,10 @@
 
 
 /**
- * This class defines the objectIdentifierMatch matching rule defined in
- * X.520 and referenced in RFC 2252. This expects to work on OIDs and
- * will match either an attribute/objectclass name or a numeric OID.
- * NOTE: This matching rule requires a schema to lookup object
- * identifiers in the descriptor form.
+ * This class defines the objectIdentifierMatch matching rule defined in X.520
+ * and referenced in RFC 2252. This expects to work on OIDs and will match
+ * either an attribute/objectclass name or a numeric OID. NOTE: This matching
+ * rule requires a schema to lookup object identifiers in the descriptor form.
  */
 final class ObjectIdentifierEqualityMatchingRuleImpl extends
     AbstractMatchingRuleImpl
@@ -51,21 +50,20 @@
 
 
 
-    OIDAssertion(String oid)
+    OIDAssertion(final String oid)
     {
       this.oid = oid;
     }
 
 
 
-    public ConditionResult matches(ByteSequence attributeValue)
+    public ConditionResult matches(final ByteSequence attributeValue)
     {
       final String attrStr = attributeValue.toString();
 
       // We should have normalized all values to OIDs. If not, we know
       // the descriptor form is not valid in the schema.
-      if (attrStr.length() == 0
-          || !StaticUtils.isDigit(attrStr.charAt(0)))
+      if (attrStr.length() == 0 || !StaticUtils.isDigit(attrStr.charAt(0)))
       {
         return ConditionResult.UNDEFINED;
       }
@@ -74,14 +72,13 @@
         return ConditionResult.UNDEFINED;
       }
 
-      return attrStr.equals(oid) ? ConditionResult.TRUE
-          : ConditionResult.FALSE;
+      return attrStr.equals(oid) ? ConditionResult.TRUE : ConditionResult.FALSE;
     }
   }
 
 
 
-  static String resolveNames(Schema schema, String oid)
+  static String resolveNames(final Schema schema, final String oid)
   {
     if (!StaticUtils.isDigit(oid.charAt(0)))
     {
@@ -98,9 +95,8 @@
       {
         if (schema.hasDITContentRule(oid))
         {
-          schemaName =
-              schema.getDITContentRule(oid).getStructuralClass()
-                  .getOID();
+          schemaName = schema.getDITContentRule(oid).getStructuralClass()
+              .getOID();
         }
       }
 
@@ -132,8 +128,8 @@
       {
         if (schema.hasMatchingRuleUse(oid))
         {
-          schemaName =
-              schema.getMatchingRuleUse(oid).getMatchingRule().getOID();
+          schemaName = schema.getMatchingRuleUse(oid).getMatchingRule()
+              .getOID();
         }
       }
 
@@ -160,26 +156,24 @@
 
 
   @Override
-  public Assertion getAssertion(Schema schema, ByteSequence value)
+  public Assertion getAssertion(final Schema schema, final ByteSequence value)
       throws DecodeException
   {
     final String definition = value.toString();
     final SubstringReader reader = new SubstringReader(definition);
-    final String normalized =
-        resolveNames(schema, SchemaUtils.readOID(reader));
+    final String normalized = resolveNames(schema, SchemaUtils.readOID(reader));
 
     return new OIDAssertion(normalized);
   }
 
 
 
-  public ByteString normalizeAttributeValue(Schema schema,
-      ByteSequence value) throws DecodeException
+  public ByteString normalizeAttributeValue(final Schema schema,
+      final ByteSequence value) throws DecodeException
   {
     final String definition = value.toString();
     final SubstringReader reader = new SubstringReader(definition);
-    final String normalized =
-        resolveNames(schema, SchemaUtils.readOID(reader));
+    final String normalized = resolveNames(schema, SchemaUtils.readOID(reader));
     return ByteString.valueOf(normalized);
   }
 }

--
Gitblit v1.10.0