From 9ee3d32dd459650afff9678e49d2535962333862 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Thu, 27 Aug 2009 15:38:26 +0000
Subject: [PATCH] Fix for issue 4195 (dsreplication enable should check that the user did not provide the same host:port twice) The fix also applies to dsreplication initialize.

---
 opends/src/server/org/opends/server/tools/dsreplication/ReplicationCliArgumentParser.java |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/opends/src/server/org/opends/server/tools/dsreplication/ReplicationCliArgumentParser.java b/opends/src/server/org/opends/server/tools/dsreplication/ReplicationCliArgumentParser.java
index 72f2982..8541de6 100644
--- a/opends/src/server/org/opends/server/tools/dsreplication/ReplicationCliArgumentParser.java
+++ b/opends/src/server/org/opends/server/tools/dsreplication/ReplicationCliArgumentParser.java
@@ -1913,7 +1913,7 @@
     if (hostName1Arg.getValue().equalsIgnoreCase(hostName2Arg.getValue()) &&
         !isInteractive())
     {
-      if (port1Arg.getValue() == port2Arg.getValue())
+      if (port1Arg.getValue().equals(port2Arg.getValue()))
       {
         Message message = ERR_REPLICATION_ENABLE_SAME_SERVER_PORT.get(
             hostName1Arg.getValue(), port1Arg.getValue());
@@ -2033,7 +2033,7 @@
     if (hostNameSourceArg.getValue().equalsIgnoreCase(
         hostNameDestinationArg.getValue()) && !isInteractive())
     {
-      if (portSourceArg.getValue() == portDestinationArg.getValue())
+      if (portSourceArg.getValue().equals(portDestinationArg.getValue()))
       {
         Message message = ERR_REPLICATION_INITIALIZE_SAME_SERVER_PORT.get(
             hostNameSourceArg.getValue(), portSourceArg.getValue());

--
Gitblit v1.10.0