From ae408b6c09759f61754f3e7b39d5e5d6595c1fc4 Mon Sep 17 00:00:00 2001
From: gbellato <gbellato@localhost>
Date: Wed, 07 Oct 2009 12:19:42 +0000
Subject: [PATCH] The documentation and the configuration of a Replication Domain allow a maximum value of 65535 for the server-id property. Nevertheless, the server-id in the ReplicationDomain implementation is managed as a short allowing a maximum value of 32767.
---
opendj-sdk/opends/src/server/org/opends/server/replication/server/ReplicationDbEnv.java | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/opendj-sdk/opends/src/server/org/opends/server/replication/server/ReplicationDbEnv.java b/opendj-sdk/opends/src/server/org/opends/server/replication/server/ReplicationDbEnv.java
index cdaaa89..12d309e 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/replication/server/ReplicationDbEnv.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/replication/server/ReplicationDbEnv.java
@@ -218,11 +218,11 @@
String[] str = stringData.split(FIELD_SEPARATOR, 2);
if (!str[0].equals(GENERATION_ID_TAG))
{
- short serverId = -1;
+ int serverId = -1;
try
{
// <serverId>
- serverId = new Short(str[0]);
+ serverId = new Integer(str[0]);
} catch (NumberFormatException e)
{
// should never happen
@@ -272,7 +272,7 @@
* @return the Database.
* @throws DatabaseException in case of underlying Exception.
*/
- public Database getOrAddDb(Short serverId, String baseDn, Long generationId)
+ public Database getOrAddDb(int serverId, String baseDn, Long generationId)
throws DatabaseException
{
if (debugEnabled())
@@ -280,7 +280,7 @@
serverId + " " + baseDn + " " + generationId);
try
{
- String stringId = serverId.toString() + FIELD_SEPARATOR + baseDn;
+ String stringId = serverId + FIELD_SEPARATOR + baseDn;
// Opens the database for the changes received from this server
// on this domain. Create it if it does not already exist.
@@ -452,7 +452,7 @@
* @param serverId The serverId to remove from the Db.
*
*/
- public void clearServerId(String baseDn, Short serverId)
+ public void clearServerId(String baseDn, int serverId)
{
if (debugEnabled())
TRACER.debugInfo(
@@ -460,7 +460,7 @@
"clearServerId(baseDN=" + baseDn + ", serverId=" + serverId);
try
{
- String stringId = serverId.toString() + FIELD_SEPARATOR + baseDn;
+ String stringId = serverId + FIELD_SEPARATOR + baseDn;
// Deletes the record serverId/domain base Dn in the stateDb
byte[] byteId;
--
Gitblit v1.10.0