From b1a075384bb211f7d7bb555019bce86b4802905a Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Tue, 19 Nov 2013 14:39:22 +0000
Subject: [PATCH] ServerStateTest.java: Added @Test annotation to testCover() - follow up of r9800
---
opends/src/server/org/opends/server/replication/common/ServerState.java | 17 +++++++----------
1 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/common/ServerState.java b/opends/src/server/org/opends/server/replication/common/ServerState.java
index ef5bd1b..1b20cb8 100644
--- a/opends/src/server/org/opends/server/replication/common/ServerState.java
+++ b/opends/src/server/org/opends/server/replication/common/ServerState.java
@@ -86,8 +86,7 @@
* ends.
* @throws DataFormatException If the encoded form was not correct.
*/
- public ServerState(byte[] in, int pos, int endpos)
- throws DataFormatException
+ public ServerState(byte[] in, int pos, int endpos) throws DataFormatException
{
try
{
@@ -373,15 +372,14 @@
List<String> csnList = new ArrayList<String>(size);
// calculate the total length needed to allocate byte array
int length = 0;
- for (Entry<Integer, CSN> entry : serverIdToCSN
- .entrySet())
+ for (Entry<Integer, CSN> entry : serverIdToCSN.entrySet())
{
// serverId is useless, see comment in ServerState ctor
- String serverIdStr = String.valueOf(entry.getKey());
+ final String serverIdStr = String.valueOf(entry.getKey());
idList.add(serverIdStr);
length += serverIdStr.length() + 1;
- String csnStr = entry.getValue().toString();
+ final String csnStr = entry.getValue().toString();
csnList.add(csnStr);
length += csnStr.length() + 1;
}
@@ -438,9 +436,8 @@
*/
public boolean cover(CSN covered)
{
- CSN change =
- this.serverIdToCSN.get(covered.getServerId());
- return change != null && !change.isOlderThan(covered);
+ final CSN csn = this.serverIdToCSN.get(covered.getServerId());
+ return csn != null && !csn.isOlderThan(covered);
}
/**
@@ -477,7 +474,7 @@
* @throws IllegalArgumentException If one of the passed state is null
*/
public static int diffChanges(ServerState ss1, ServerState ss2)
- throws IllegalArgumentException
+ throws IllegalArgumentException
{
if (ss1 == null || ss2 == null)
{
--
Gitblit v1.10.0