From 4df4b439048aa629e87945af2e4dfac9747e0861 Mon Sep 17 00:00:00 2001
From: Violette Roche-Montane <violette.roche-montane@forgerock.com>
Date: Mon, 05 May 2014 15:56:21 +0000
Subject: [PATCH] OPENDJ-1303 "opendj-cli" - Removed && replaced StaticUtils.wrapText by com.forgerock.opendj.cli.Utils.wrapText;
---
opendj3-server-dev/src/server/org/opends/server/util/cli/PointAdder.java | 45 +++++++++++++++++----------------------------
1 files changed, 17 insertions(+), 28 deletions(-)
diff --git a/opendj3-server-dev/src/server/org/opends/server/util/cli/PointAdder.java b/opendj3-server-dev/src/server/org/opends/server/util/cli/PointAdder.java
index 93d9489..f1662c4 100644
--- a/opendj3-server-dev/src/server/org/opends/server/util/cli/PointAdder.java
+++ b/opendj3-server-dev/src/server/org/opends/server/util/cli/PointAdder.java
@@ -34,7 +34,6 @@
/**
* Class used to add points periodically to the end of the output.
- *
*/
public class PointAdder implements Runnable
{
@@ -54,9 +53,10 @@
/**
* Default constructor.
- * @param app the console application to be used.
- * Creates a PointAdder that writes to the standard output with the default
- * period time.
+ *
+ * @param app
+ * The console application to be used. Creates a PointAdder that
+ * writes to the standard output with the default period time.
*/
public PointAdder(ConsoleApplication app)
{
@@ -66,11 +66,16 @@
/**
* Default constructor.
- * @param app the console application to be used.
- * @param periodTime the time between printing two points.
- * @param isError whether the points must be printed in error stream
- * or output stream.
- * @param formatter the text formatter.
+ *
+ * @param app
+ * The console application to be used.
+ * @param periodTime
+ * The time between printing two points.
+ * @param isError
+ * Whether the points must be printed in error stream or output
+ * stream.
+ * @param formatter
+ * The text formatter.
*/
public PointAdder(ConsoleApplication app,
long periodTime, boolean isError,
@@ -94,14 +99,7 @@
{
mb.append(formatter.getFormattedPoint());
}
- if (isError)
- {
- app.print(mb.toMessage());
- }
- else
- {
- app.print(mb.toMessage());
- }
+ app.print(mb.toMessage());
t = new Thread(this);
t.start();
}
@@ -127,9 +125,7 @@
}
}
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
public void run()
{
while (!stopPointAdder)
@@ -137,14 +133,7 @@
try
{
Thread.sleep(periodTime);
- if (isError)
- {
- app.print(formatter.getFormattedPoint());
- }
- else
- {
- app.print(formatter.getFormattedPoint());
- }
+ app.print(formatter.getFormattedPoint());
}
catch (Throwable t)
{
--
Gitblit v1.10.0