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/UpdateMsg.java | 20 +++++---------------
1 files changed, 5 insertions(+), 15 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/protocol/UpdateMsg.java b/opends/src/server/org/opends/server/replication/protocol/UpdateMsg.java
index 8b7b081..1c30cc8 100644
--- a/opends/src/server/org/opends/server/replication/protocol/UpdateMsg.java
+++ b/opends/src/server/org/opends/server/replication/protocol/UpdateMsg.java
@@ -23,6 +23,7 @@
*
*
* Copyright 2006-2009 Sun Microsystems, Inc.
+ * Portions Copyright 2013 ForgeRock AS.
*/
package org.opends.server.replication.protocol;
@@ -77,7 +78,7 @@
{}
/**
- * Creates a new UpdateMsg with the given informations.
+ * Creates a new UpdateMsg with the given information.
*
* @param bytes A Byte Array with the encoded form of the message.
*
@@ -157,16 +158,8 @@
@Override
public boolean equals(Object obj)
{
- if (obj != null)
- {
- if (obj.getClass() != this.getClass())
- return false;
- return changeNumber.equals(((UpdateMsg) obj).changeNumber);
- }
- else
- {
- return false;
- }
+ return obj != null && obj.getClass() == this.getClass() &&
+ changeNumber.equals(((UpdateMsg) obj).changeNumber);
}
/**
@@ -343,10 +336,7 @@
changeNumber = new ChangeNumber(changenumberStr);
/* 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++]);
--
Gitblit v1.10.0