From c7077670daca3b689ed75e4bf71dad0483af8473 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Mon, 19 Aug 2013 13:27:40 +0000
Subject: [PATCH] Avoided possible costly thread leaks in ReplicationServerDomain.

---
 opends/src/server/org/opends/server/replication/protocol/WindowProbeMsg.java |   23 +++++++++--------------
 1 files changed, 9 insertions(+), 14 deletions(-)

diff --git a/opends/src/server/org/opends/server/replication/protocol/WindowProbeMsg.java b/opends/src/server/org/opends/server/replication/protocol/WindowProbeMsg.java
index 91e3679..afddeb9 100644
--- a/opends/src/server/org/opends/server/replication/protocol/WindowProbeMsg.java
+++ b/opends/src/server/org/opends/server/replication/protocol/WindowProbeMsg.java
@@ -29,17 +29,16 @@
 
 import java.util.zip.DataFormatException;
 
-
 /**
- * This message is used by LDAP or Replication Server that have been
- * out of credit for a while and want to check that the remote servers.
- *
- * A sending entity that is blocked because its send window is closed
- * for a while should create such a message to check that the window
- * closure is valid.
- *
+ * This message is used by LDAP or Replication Server that have been out of
+ * credit for a while and want to check if the remote servers is able to accept
+ * more messages.
+ * <p>
+ * A sending entity that is blocked because its send window is closed for a
+ * while should create such a message to check that the window closure is valid.
+ * <p>
  * An entity that received such a message should respond with a
- * WindowUpdate message indicating the curent credit available.
+ * {@link WindowMsg} indicating the current credit available.
  */
 public class WindowProbeMsg extends ReplicationMsg
 {
@@ -72,10 +71,6 @@
   public byte[] getBytes(short protocolVersion)
   {
     // WindowProbeMsg Message only contains its type.
-
-    byte[] resultByteArray = new byte[1];
-    resultByteArray[0] = MSG_TYPE_WINDOW_PROBE;
-
-    return resultByteArray;
+    return new byte[] { MSG_TYPE_WINDOW_PROBE };
   }
 }

--
Gitblit v1.10.0