From 2f01ee4d569022fff64691323b9bbcedc4285d98 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Fri, 31 Jan 2014 11:30:32 +0000
Subject: [PATCH] Removed now useless calls to .toString() on arguments of ArgN.get(...).

---
 opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/util/ConfigFromDirContext.java |   25 ++++++++-----------------
 1 files changed, 8 insertions(+), 17 deletions(-)

diff --git a/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/util/ConfigFromDirContext.java b/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/util/ConfigFromDirContext.java
index 393e5f2..999516f 100644
--- a/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/util/ConfigFromDirContext.java
+++ b/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/util/ConfigFromDirContext.java
@@ -509,9 +509,7 @@
     }
     catch (final Throwable t)
     {
-      OnlineUpdateException oupe = new OnlineUpdateException(
-          ERR_READING_CONFIG_LDAP.get(t.toString()), t);
-      ex.add(oupe);
+      ex.add(new OnlineUpdateException(ERR_READING_CONFIG_LDAP.get(t), t));
     }
     for (OpenDsException oe : ex)
     {
@@ -527,9 +525,7 @@
     catch (Throwable t)
     {
       logger.warn(LocalizableMessage.raw("Error reading monitoring: "+t, t));
-      OnlineUpdateException oupe = new OnlineUpdateException(
-          ERR_READING_CONFIG_LDAP.get(t.toString()), t);
-      ex.add(oupe);
+      ex.add(new OnlineUpdateException(ERR_READING_CONFIG_LDAP.get(t), t));
     }
     try
     {
@@ -538,9 +534,7 @@
     catch (Throwable t)
     {
       logger.warn(LocalizableMessage.raw("Error reading task information: "+t, t));
-      OnlineUpdateException oupe = new OnlineUpdateException(
-          ERR_READING_CONFIG_LDAP.get(t.toString()), t);
-      ex.add(oupe);
+      ex.add(new OnlineUpdateException(ERR_READING_CONFIG_LDAP.get(t), t));
     }
     taskEntries = Collections.unmodifiableSet(ts);
     for (ConnectionHandlerDescriptor ch : getConnectionHandlers())
@@ -585,8 +579,7 @@
       }
       catch (NamingException ne)
       {
-        throw new OnlineUpdateException(
-            ERR_READING_SCHEMA_LDAP.get(ne.toString()), ne);
+        throw new OnlineUpdateException(ERR_READING_SCHEMA_LDAP.get(ne), ne);
       }
       schema = loader.getSchema();
     }
@@ -837,9 +830,8 @@
     }
     catch (NamingException ne)
     {
-      OnlineUpdateException oue = new OnlineUpdateException(
-          ERR_READING_CONFIG_LDAP.get(ne.getMessage().toString()), ne);
-      ex.add(oue);
+      ex.add(new OnlineUpdateException(
+          ERR_READING_CONFIG_LDAP.get(ne.getMessage()), ne));
     }
   }
 
@@ -884,9 +876,8 @@
     }
     catch (NamingException ne)
     {
-      OnlineUpdateException oue = new OnlineUpdateException(
-          ERR_READING_CONFIG_LDAP.get(ne.getMessage().toString()), ne);
-      ex.add(oue);
+      ex.add(new OnlineUpdateException(
+          ERR_READING_CONFIG_LDAP.get(ne.getMessage()), ne));
     }
   }
 

--
Gitblit v1.10.0