From 6c857f852f405a08653a4cfd86cc0257e7df486d Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Wed, 19 Jun 2013 08:36:16 +0000
Subject: [PATCH] Fix OPENDJ-986: Exception when reading messages from Replication server RS

---
 opendj-sdk/opends/src/server/org/opends/server/replication/protocol/StartMsg.java |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/opendj-sdk/opends/src/server/org/opends/server/replication/protocol/StartMsg.java b/opendj-sdk/opends/src/server/org/opends/server/replication/protocol/StartMsg.java
index b621cae..d9f16e2 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/replication/protocol/StartMsg.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/replication/protocol/StartMsg.java
@@ -54,8 +54,9 @@
   /**
    * Create a new StartMsg.
    */
-  public StartMsg()
+  protected StartMsg()
   {
+    // Nothing to do.
   }
 
   /**
@@ -78,7 +79,7 @@
    * @param type The type of the message to create.
    * @param additionalLength Additional length needed to encode the remaining
    *                         part of the UpdateMessage.
-   * @param protocolVersion  The version to use when encoding the header.
+   * @param sessionProtocolVersion  The version to use when encoding the header.
    * @return a byte array containing the common header and enough space to
    *         encode the remaining bytes of the UpdateMessage as was specified
    *         by the additionalLength.
@@ -87,7 +88,7 @@
    */
   public byte[] encodeHeader(
       byte type, int additionalLength,
-      short protocolVersion)
+      short sessionProtocolVersion)
   throws UnsupportedEncodingException
   {
 
@@ -106,7 +107,7 @@
     encodedMsg[0] = type;
 
     /* put the protocol version */
-    encodedMsg[1] = (byte)protocolVersion;
+    encodedMsg[1] = (byte)sessionProtocolVersion;
 
     /* put the generationId */
     int pos = 2;

--
Gitblit v1.10.0