From b7dde5b118fe17e86a65bb53c35322d2ba64aa55 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Mon, 05 Aug 2013 15:03:12 +0000
Subject: [PATCH] Code cleanup.

---
 opendj-sdk/opends/src/server/org/opends/server/replication/server/ServerHandler.java |   17 ++++++-----------
 1 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/opendj-sdk/opends/src/server/org/opends/server/replication/server/ServerHandler.java b/opendj-sdk/opends/src/server/org/opends/server/replication/server/ServerHandler.java
index 2a69374..e6ea8fb 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/replication/server/ServerHandler.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/replication/server/ServerHandler.java
@@ -32,7 +32,7 @@
 import static org.opends.server.loggers.debug.DebugLogger.*;
 
 import java.io.IOException;
-import java.util.ArrayList;
+import java.util.List;
 import java.util.Random;
 import java.util.concurrent.Semaphore;
 import java.util.concurrent.TimeUnit;
@@ -217,7 +217,7 @@
   /**
    * The thread that will send heartbeats.
    */
-  HeartbeatThread heartbeatThread = null;
+  private HeartbeatThread heartbeatThread;
 
   /**
    * Set when ServerWriter is stopping.
@@ -241,21 +241,16 @@
    *                 communicate with the remote entity.
    * @param queueSize The maximum number of update that will be kept
    *                  in memory by this ServerHandler.
-   * @param replicationServerURL The URL of the hosting replication server.
-   * @param replicationServerId The serverId of the hosting replication server.
    * @param replicationServer The hosting replication server.
    * @param rcvWindowSize The window size to receive from the remote server.
    */
   public ServerHandler(
       Session session,
       int queueSize,
-      String replicationServerURL,
-      int replicationServerId,
       ReplicationServer replicationServer,
       int rcvWindowSize)
   {
-    super(queueSize, replicationServerURL,
-        replicationServerId, replicationServer);
+    super(queueSize, replicationServer);
     this.session = session;
     this.rcvWindowSizeHalf = rcvWindowSize / 2;
     this.maxRcvWindow = rcvWindowSize;
@@ -587,10 +582,10 @@
    *          requested.
    */
   @Override
-  public ArrayList<Attribute> getMonitorData()
+  public List<Attribute> getMonitorData()
   {
     // Get the generic ones
-    ArrayList<Attribute> attributes = super.getMonitorData();
+    List<Attribute> attributes = super.getMonitorData();
 
     attributes.add(Attributes.create("server-id", String.valueOf(serverId)));
     attributes.add(Attributes.create("domain-name", getBaseDN()));
@@ -908,7 +903,7 @@
             getBaseDN(),
             serverId,
             session.getReadableRemoteAddress(),
-            replicationServerId);
+            getReplicationServerId());
         throw new DirectoryException(ResultCode.OTHER, message);
       }
     }

--
Gitblit v1.10.0