From 59b4905a66a5db370e6d0de5f7cb6dcd314ef443 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Sun, 26 Aug 2007 03:16:07 +0000
Subject: [PATCH] This commit includes all the code for the first version of the replication tools. As they require further testing the command line associated with them has not been committed.
---
opends/src/quicksetup/org/opends/quicksetup/util/Utils.java | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java b/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java
index 54ebfe5..1cc5976 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java
@@ -517,18 +517,17 @@
public static String getStringFromCollection(Collection<String> col,
String separator)
{
- String msg = null;
+ StringBuffer msg = new StringBuffer();
for (String m : col)
{
- if (msg == null)
+
+ if (msg.length() > 0)
{
- msg = m;
- } else
- {
- msg += separator + m;
+ msg.append(separator);
}
+ msg.append(m);
}
- return msg;
+ return msg.toString();
}
/**
@@ -669,7 +668,7 @@
* @param te the exception.
* @return a localized representation of the provide TopologyCacheException.
*/
- public static String getStringRepresentation(TopologyCacheException te)
+ public static Message getMessage(TopologyCacheException te)
{
MessageBuilder buf = new MessageBuilder();
@@ -690,7 +689,7 @@
// This is unexpected.
buf.append(getThrowableMsg(INFO_BUG_MSG.get(), te.getCause()));
}
- return buf.toString();
+ return buf.toMessage();
}
/**
--
Gitblit v1.10.0