From 46fd9423ab622d7f9531aa1564846ec52fe09534 Mon Sep 17 00:00:00 2001
From: Ludovic Poitou <ludovic.poitou@forgerock.com>
Date: Wed, 24 Apr 2013 12:44:51 +0000
Subject: [PATCH] Replication Cleanup.

---
 opends/src/server/org/opends/server/replication/protocol/LDAPUpdateMsg.java |   24 +++++++++---------------
 1 files changed, 9 insertions(+), 15 deletions(-)

diff --git a/opends/src/server/org/opends/server/replication/protocol/LDAPUpdateMsg.java b/opends/src/server/org/opends/server/replication/protocol/LDAPUpdateMsg.java
index 0f9b776..bce6fcf 100644
--- a/opends/src/server/org/opends/server/replication/protocol/LDAPUpdateMsg.java
+++ b/opends/src/server/org/opends/server/replication/protocol/LDAPUpdateMsg.java
@@ -87,7 +87,7 @@
   }
 
   /**
-   * Creates a new UpdateMsg with the given informations.
+   * Creates a new UpdateMsg with the given information.
    *
    * @param ctx The replication Context of the operation for which the
    *            update message must be created,.
@@ -103,7 +103,7 @@
   }
 
   /**
-   * Creates a new UpdateMessage with the given informations.
+   * Creates a new UpdateMessage with the given information.
    *
    * @param cn        The ChangeNumber of the operation for which the
    *                  UpdateMessage is created.
@@ -491,9 +491,9 @@
        /* Read the changeNumber */
        int pos = 2;
        int length = getNextLength(encodedMsg, pos);
-       String changenumberStr = new String(encodedMsg, pos, length, "UTF-8");
+       String changeNumberStr = new String(encodedMsg, pos, length, "UTF-8");
        pos += length + 1;
-       changeNumber = new ChangeNumber(changenumberStr);
+       changeNumber = new ChangeNumber(changeNumberStr);
 
        /* Read the dn */
        length = getNextLength(encodedMsg, pos);
@@ -506,10 +506,7 @@
        pos += length + 1;
 
        /* Read the assured information */
-       if (encodedMsg[pos++] == 1)
-         assuredFlag = true;
-       else
-         assuredFlag = false;
+       assuredFlag = encodedMsg[pos++] == 1;
 
        /* Read the assured mode */
        assuredMode = AssuredMode.valueOf(encodedMsg[pos++]);
@@ -556,15 +553,12 @@
       /* read the changeNumber */
       int pos = 1;
       int length = getNextLength(encodedMsg, pos);
-      String changenumberStr = new String(encodedMsg, pos, length, "UTF-8");
+      String changeNumberStr = new String(encodedMsg, pos, length, "UTF-8");
       pos += length + 1;
-      changeNumber = new ChangeNumber(changenumberStr);
+      changeNumber = new ChangeNumber(changeNumberStr);
 
       /* read the assured information */
-      if (encodedMsg[pos++] == 1)
-        assuredFlag = true;
-      else
-        assuredFlag = false;
+      assuredFlag = encodedMsg[pos++] == 1;
 
       /* read the dn */
       length = getNextLength(encodedMsg, pos);
@@ -628,7 +622,7 @@
   /**
    * Decode a provided byte array as a list of RawAttribute.
    * @param in The provided byte array.
-   * @return The list of Rawattribute objects.
+   * @return The list of RawAttribute objects.
    * @throws LDAPException when it occurs.
    * @throws ASN1Exception when it occurs.
    */

--
Gitblit v1.10.0