From 31216400c324b43c15b8a9eea6d89604247ebb14 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Mon, 03 Feb 2014 12:10:05 +0000
Subject: [PATCH] Removed now useless calls to String.valueOf() on arguments of ArgN.get(...).

---
 opendj3-server-dev/src/server/org/opends/server/tools/dsreplication/ReplicationCliMain.java |   39 +++++++++++++--------------------------
 1 files changed, 13 insertions(+), 26 deletions(-)

diff --git a/opendj3-server-dev/src/server/org/opends/server/tools/dsreplication/ReplicationCliMain.java b/opendj3-server-dev/src/server/org/opends/server/tools/dsreplication/ReplicationCliMain.java
index 288aa94..1ec445c 100644
--- a/opendj3-server-dev/src/server/org/opends/server/tools/dsreplication/ReplicationCliMain.java
+++ b/opendj3-server-dev/src/server/org/opends/server/tools/dsreplication/ReplicationCliMain.java
@@ -1829,9 +1829,7 @@
             if (replicationPort1 == port1)
             {
               println();
-              println(
-                  ERR_REPLICATION_PORT_AND_REPLICATION_PORT_EQUAL.get(
-                      host1, String.valueOf(replicationPort1)));
+              println(ERR_REPLICATION_PORT_AND_REPLICATION_PORT_EQUAL.get(host1, replicationPort1));
               println();
               replicationPort1 = -1;
             }
@@ -1842,8 +1840,8 @@
           try
           {
             secureReplication1 =
-              askConfirmation(INFO_REPLICATION_ENABLE_SECURE1_PROMPT.get(
-                String.valueOf(replicationPort1)), false, logger);
+              askConfirmation(INFO_REPLICATION_ENABLE_SECURE1_PROMPT.get(replicationPort1),
+                  false, logger);
           }
           catch (CLIException ce)
           {
@@ -1979,8 +1977,7 @@
           if (port1 == port2)
           {
             port2 = -1;
-            LocalizableMessage message = ERR_REPLICATION_ENABLE_SAME_SERVER_PORT.get(
-                host1, String.valueOf(port1));
+            LocalizableMessage message = ERR_REPLICATION_ENABLE_SAME_SERVER_PORT.get(host1, port1);
             println();
             println(message);
             println();
@@ -2122,9 +2119,7 @@
               if (replicationPort2 == port2)
               {
                 println();
-                println(
-                    ERR_REPLICATION_PORT_AND_REPLICATION_PORT_EQUAL.get(
-                        host2, String.valueOf(replicationPort2)));
+                println(ERR_REPLICATION_PORT_AND_REPLICATION_PORT_EQUAL.get(host2, replicationPort2));
                 replicationPort2 = -1;
               }
             }
@@ -2134,8 +2129,7 @@
                   (replicationPort1 == replicationPort2))
               {
                 println();
-                println(ERR_REPLICATION_SAME_REPLICATION_PORT.get(
-                    String.valueOf(replicationPort2), host1));
+                println(ERR_REPLICATION_SAME_REPLICATION_PORT.get(replicationPort2, host1));
                 println();
                 replicationPort2 = -1;
               }
@@ -2146,8 +2140,7 @@
             try
             {
               secureReplication2 =
-                askConfirmation(INFO_REPLICATION_ENABLE_SECURE2_PROMPT.get(
-                    String.valueOf(replicationPort2)), false, logger);
+                askConfirmation(INFO_REPLICATION_ENABLE_SECURE2_PROMPT.get(replicationPort2), false, logger);
             }
             catch (CLIException ce)
             {
@@ -3032,8 +3025,7 @@
           if (portSource == portDestination)
           {
             portDestination = -1;
-            LocalizableMessage message = ERR_REPLICATION_INITIALIZE_SAME_SERVER_PORT.get(
-                hostSource, String.valueOf(portSource));
+            LocalizableMessage message = ERR_REPLICATION_INITIALIZE_SAME_SERVER_PORT.get(hostSource, portSource);
             println();
             println(message);
             println();
@@ -4085,8 +4077,7 @@
             (replPort1 == replPort2) &&
             (host1.equalsIgnoreCase(host2)))
         {
-          errorMessages.add(ERR_REPLICATION_SAME_REPLICATION_PORT.get(
-              String.valueOf(replPort1), host1));
+          errorMessages.add(ERR_REPLICATION_SAME_REPLICATION_PORT.get(replPort1, host1));
         }
 
         if (argParser.skipReplicationPortCheck())
@@ -4096,15 +4087,13 @@
           if (checkReplicationPort1 && replPort1 == port1)
           {
             errorMessages.add(
-                ERR_REPLICATION_PORT_AND_REPLICATION_PORT_EQUAL.get(
-                host1, String.valueOf(replPort1)));
+                ERR_REPLICATION_PORT_AND_REPLICATION_PORT_EQUAL.get(host1, replPort1));
           }
 
           if (checkReplicationPort2 && replPort2 == port2)
           {
             errorMessages.add(
-                ERR_REPLICATION_PORT_AND_REPLICATION_PORT_EQUAL.get(
-                host2, String.valueOf(replPort2)));
+                ERR_REPLICATION_PORT_AND_REPLICATION_PORT_EQUAL.get(host2, replPort2));
           }
         }
       }
@@ -4197,8 +4186,7 @@
           println(INFO_WARNING_SERVERS_CLOCK_DIFFERENCE.get(
               ConnectionUtils.getHostPort(ctx1),
               ConnectionUtils.getHostPort(ctx2),
-              String.valueOf(
-                  Installer.THRESHOLD_CLOCK_DIFFERENCE_WARNING)));
+              Installer.THRESHOLD_CLOCK_DIFFERENCE_WARNING));
         }
       }
       printlnProgress();
@@ -8412,8 +8400,7 @@
           if (processed + unprocessed > 0)
           {
             long perc = (100 * processed) / (processed + unprocessed);
-            msg = INFO_INITIALIZE_PROGRESS_WITH_PERCENTAGE.get(sProcessed,
-                String.valueOf(perc));
+            msg = INFO_INITIALIZE_PROGRESS_WITH_PERCENTAGE.get(sProcessed, perc);
           }
           else
           {

--
Gitblit v1.10.0