From e677340108bdb6a10a907e0eec9071366bf41a8c Mon Sep 17 00:00:00 2001
From: Gaetan Boismal <gaetan.boismal@forgerock.com>
Date: Mon, 26 Jan 2015 09:50:36 +0000
Subject: [PATCH] OPENDJ-1230: Code cleanup

---
 opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/DITStructureRule.java |   22 +++---
 opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/DITContentRule.java   |    2 
 opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/ObjectClass.java      |   24 ++++----
 opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/AttributeType.java    |    2 
 opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/MatchingRule.java     |   31 +++++-----
 opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/NameForm.java         |   29 ++++-----
 opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/Syntax.java           |   27 ++++----
 7 files changed, 68 insertions(+), 69 deletions(-)

diff --git a/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/AttributeType.java b/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/AttributeType.java
index 25d7daf..af9ed47 100644
--- a/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/AttributeType.java
+++ b/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/AttributeType.java
@@ -98,7 +98,7 @@
         }
 
         /**
-         * Adds this attribute type to the schema, throwing an
+         * Adds this attribute type to the schema, throwing a
          * {@code ConflictingSchemaElementException} if there is an existing
          * attribute type with the same numeric OID.
          *
diff --git a/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/DITContentRule.java b/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/DITContentRule.java
index 4743532..595056a 100644
--- a/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/DITContentRule.java
+++ b/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/DITContentRule.java
@@ -81,7 +81,7 @@
         }
 
         /**
-         * Adds this DIT content rule to the schema, throwing an
+         * Adds this DIT content rule to the schema, throwing a
          * {@code  ConflictingSchemaElementException} if there is an existing DIT
          * content rule with the same structural object class OID.
          *
diff --git a/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/DITStructureRule.java b/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/DITStructureRule.java
index 171c982..30006f4 100644
--- a/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/DITStructureRule.java
+++ b/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/DITStructureRule.java
@@ -75,17 +75,7 @@
         }
 
         /**
-         * Adds this DIT structure rule to the schema overwriting any existing
-         * DIT structure rule with the same numeric ID.
-         *
-         * @return The parent schema builder.
-         */
-        public SchemaBuilder addToSchemaOverwrite() {
-            return getSchemaBuilder().addDITStructureRule(new DITStructureRule(this), true);
-        }
-
-        /**
-         * Adds this DIT structure rule to the schema, throwing an
+         * Adds this DIT structure rule to the schema, throwing a
          * {@code  ConflictingSchemaElementException} if there is an existing DIT
          * structure rule with the same numeric ID.
          *
@@ -98,6 +88,16 @@
             return getSchemaBuilder().addDITStructureRule(new DITStructureRule(this), false);
         }
 
+        /**
+         * Adds this DIT structure rule to the schema overwriting any existing
+         * DIT structure rule with the same numeric ID.
+         *
+         * @return The parent schema builder.
+         */
+        public SchemaBuilder addToSchemaOverwrite() {
+            return getSchemaBuilder().addDITStructureRule(new DITStructureRule(this), true);
+        }
+
         @Override
         public Builder description(final String description) {
             return description0(description);
diff --git a/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/MatchingRule.java b/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/MatchingRule.java
index d7b56a4..e9f6bdc 100644
--- a/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/MatchingRule.java
+++ b/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/MatchingRule.java
@@ -59,9 +59,8 @@
  * or via the {@link #toString()} methods.
  */
 public final class MatchingRule extends SchemaElement {
-    /**
-     * A fluent API for incrementally constructing matching rules.
-     */
+
+    /** A fluent API for incrementally constructing matching rules. */
     public static final class Builder extends SchemaElementBuilder<Builder> {
         private String oid;
         private final List<String> names = new LinkedList<String>();
@@ -84,6 +83,20 @@
         }
 
         /**
+         * Adds this matching rule to the schema, throwing a
+         * {@code ConflictingSchemaElementException} if there is an existing
+         * matching rule with the same numeric OID.
+         *
+         * @return The parent schema builder.
+         * @throws ConflictingSchemaElementException
+         *             If there is an existing matching rule with the same
+         *             numeric OID.
+         */
+        public SchemaBuilder addToSchema() {
+            return getSchemaBuilder().addMatchingRule(new MatchingRule(this), false);
+        }
+
+        /**
          * Adds this matching rule to the schema overwriting any existing matching rule with the same numeric OID.
          *
          * @return The parent schema builder.
@@ -92,18 +105,6 @@
             return getSchemaBuilder().addMatchingRule(new MatchingRule(this), true);
         }
 
-        /**
-         * Adds this matching rule to the schema, throwing an {@code  ConflictingSchemaElementException} if there is an
-         * existing matching rule with the same numeric OID.
-         *
-         * @return The parent schema builder.
-         * @throws ConflictingSchemaElementException
-         *             If there is an existing matching rule with the same numeric OID.
-         */
-        public SchemaBuilder addToSchema() {
-            return getSchemaBuilder().addMatchingRule(new MatchingRule(this), false);
-        }
-
         @Override
         public Builder description(final String description) {
             return description0(description);
diff --git a/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/NameForm.java b/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/NameForm.java
index 8081c53..4eec7ba 100644
--- a/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/NameForm.java
+++ b/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/NameForm.java
@@ -51,9 +51,8 @@
  * RDN of an entry with a given structural objectclass.
  */
 public final class NameForm extends SchemaElement {
-    /**
-     * A fluent API for incrementally constructing name forms.
-     */
+
+    /** A fluent API for incrementally constructing name forms. */
     public static final class Builder extends SchemaElementBuilder<Builder> {
         private boolean isObsolete;
         private final List<String> names = new LinkedList<String>();
@@ -78,18 +77,8 @@
         }
 
         /**
-         * Adds this name form to the schema overwriting any existing name form
-         * with the same numeric OID.
-         *
-         * @return The parent schema builder.
-         */
-        public SchemaBuilder addToSchemaOverwrite() {
-            return getSchemaBuilder().addNameForm(new NameForm(this), true);
-        }
-
-        /**
-         * Adds this name form to the schema, throwing an
-         * {@code  ConflictingSchemaElementException} if there is an existing
+         * Adds this name form to the schema, throwing a
+         * {@code ConflictingSchemaElementException} if there is an existing
          * name form with the same numeric OID.
          *
          * @return The parent schema builder.
@@ -101,6 +90,16 @@
             return getSchemaBuilder().addNameForm(new NameForm(this), false);
         }
 
+        /**
+         * Adds this name form to the schema overwriting any existing name form
+         * with the same numeric OID.
+         *
+         * @return The parent schema builder.
+         */
+        public SchemaBuilder addToSchemaOverwrite() {
+            return getSchemaBuilder().addNameForm(new NameForm(this), true);
+        }
+
         @Override
         public Builder description(final String description) {
             return description0(description);
diff --git a/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/ObjectClass.java b/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/ObjectClass.java
index c059dc3..af0903a 100644
--- a/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/ObjectClass.java
+++ b/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/ObjectClass.java
@@ -86,18 +86,8 @@
         }
 
         /**
-         * Adds this object class to the schema overwriting any existing object class
-         * with the same numeric OID.
-         *
-         * @return The parent schema builder.
-         */
-        public SchemaBuilder addToSchemaOverwrite() {
-            return getSchemaBuilder().addObjectClass(new ObjectClass(this), true);
-        }
-
-        /**
-         * Adds this object class to the schema, throwing an
-         * {@code  ConflictingSchemaElementException} if there is an existing
+         * Adds this object class to the schema, throwing a
+         * {@code ConflictingSchemaElementException} if there is an existing
          * object class with the same numeric OID.
          *
          * @return The parent schema builder.
@@ -109,6 +99,16 @@
             return getSchemaBuilder().addObjectClass(new ObjectClass(this), false);
         }
 
+        /**
+         * Adds this object class to the schema overwriting any existing object class
+         * with the same numeric OID.
+         *
+         * @return The parent schema builder.
+         */
+        public SchemaBuilder addToSchemaOverwrite() {
+            return getSchemaBuilder().addObjectClass(new ObjectClass(this), true);
+        }
+
         @Override
         public Builder description(final String description) {
             return description0(description);
diff --git a/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/Syntax.java b/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/Syntax.java
index 6e1912c..c651cc4 100644
--- a/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/Syntax.java
+++ b/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/Syntax.java
@@ -55,9 +55,7 @@
  */
 public final class Syntax extends SchemaElement {
 
-    /**
-     * A fluent API for incrementally constructing syntaxes.
-     */
+    /** A fluent API for incrementally constructing syntaxes. */
     public static final class Builder extends SchemaElementBuilder<Builder> {
 
         private String oid;
@@ -75,17 +73,9 @@
         }
 
         /**
-         * Adds this syntax to the schema overwriting any existing syntax with the same numeric OID.
-         *
-         * @return The parent schema builder.
-         */
-        public SchemaBuilder addToSchemaOverwrite() {
-            return getSchemaBuilder().addSyntax(new Syntax(this), true);
-        }
-
-        /**
-         * Adds this syntax to the schema, throwing an {@code  ConflictingSchemaElementException}
-         * if there is an existing syntax with the same numeric OID.
+         * Adds this syntax to the schema, throwing a
+         * {@code ConflictingSchemaElementException} if there is an existing
+         * syntax with the same numeric OID.
          *
          * @return The parent schema builder.
          * @throws ConflictingSchemaElementException
@@ -96,6 +86,15 @@
         }
 
         /**
+         * Adds this syntax to the schema overwriting any existing syntax with the same numeric OID.
+         *
+         * @return The parent schema builder.
+         */
+        public SchemaBuilder addToSchemaOverwrite() {
+            return getSchemaBuilder().addSyntax(new Syntax(this), true);
+        }
+
+        /**
          * Adds this syntax to the schema - overwriting any existing syntax with the same numeric OID
          * if the overwrite parameter is set to {@code true}.
          *

--
Gitblit v1.10.0