From ed1a629a316f84a8a9f9d49680f9d2a11aea3034 Mon Sep 17 00:00:00 2001
From: gbellato <gbellato@localhost>
Date: Wed, 16 May 2007 13:20:36 +0000
Subject: [PATCH] use the admin framework facilities to do pattern matchin on the replication server addresses to make sure that it contain both a hostname and a port number.
---
opends/src/server/org/opends/server/replication/plugin/ReplicationBroker.java | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/plugin/ReplicationBroker.java b/opends/src/server/org/opends/server/replication/plugin/ReplicationBroker.java
index 8319aa1..a6268a4 100644
--- a/opends/src/server/org/opends/server/replication/plugin/ReplicationBroker.java
+++ b/opends/src/server/org/opends/server/replication/plugin/ReplicationBroker.java
@@ -203,9 +203,9 @@
{
for (String server : servers)
{
- String token[] = server.split(":");
- String hostname = token[0];
- String port = token[1];
+ int separator = server.lastIndexOf(':');
+ String port = server.substring(separator + 1);
+ String hostname = server.substring(0, separator);
try
{
--
Gitblit v1.10.0