From fa1fb5f8ca6791f4cf614cf52aa4842345e64e12 Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Fri, 18 Sep 2015 13:59:37 +0000
Subject: [PATCH] Modification.java: code cleanup

---
 opendj-server-legacy/src/main/java/org/opends/server/types/Modification.java |   22 ++++++----------------
 1 files changed, 6 insertions(+), 16 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/types/Modification.java b/opendj-server-legacy/src/main/java/org/opends/server/types/Modification.java
index c7f9df7..29c004c 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/types/Modification.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/types/Modification.java
@@ -41,29 +41,23 @@
 {
   /** The attribute for this modification. */
   private Attribute attribute;
-
+  /** The modification type for this modification. */
+  private ModificationType modificationType;
   /**
    * Indicates whether this modification was generated by internal processing
    * and therefore should not be subject to no-user-modification and related checks.
    */
   private boolean isInternal;
 
-  /** The modification type for this modification. */
-  private ModificationType modificationType;
-
   /**
    * Creates a new modification with the provided information.
    *
    * @param  modificationType  The modification type for this modification.
    * @param  attribute         The attribute for this modification.
    */
-  public Modification(ModificationType modificationType,
-                      Attribute attribute)
+  public Modification(ModificationType modificationType, Attribute attribute)
   {
-    this.modificationType = modificationType;
-    this.attribute        = attribute;
-
-    isInternal = false;
+    this(modificationType, attribute, false);
   }
 
   /**
@@ -75,8 +69,7 @@
    *                           and therefore should not be subject to
    *                           no-user-modification and related checks.
    */
-  public Modification(ModificationType modificationType,
-                      Attribute attribute, boolean isInternal)
+  public Modification(ModificationType modificationType, Attribute attribute, boolean isInternal)
   {
     this.modificationType = modificationType;
     this.attribute        = attribute;
@@ -216,9 +209,6 @@
    */
   public void toString(StringBuilder buffer)
   {
-    buffer.append("Modification(");
-    buffer.append(modificationType);
-    buffer.append(", ");
-    buffer.append(attribute);
+    buffer.append("Modification(").append(modificationType).append(", ").append(attribute);
   }
 }

--
Gitblit v1.10.0