From 0fd845d18cfaf23fc9f54e92775c735955e4e859 Mon Sep 17 00:00:00 2001
From: Gaetan Boismal <gaetan.boismal@forgerock.com>
Date: Mon, 27 Jul 2015 09:02:08 +0000
Subject: [PATCH] OPENDJ-2027 CR-7646 Change tools message on error
---
opendj-server-legacy/src/main/java/org/opends/server/tools/makeldif/MakeLDIF.java | 22 +++++++++++++++++++---
1 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/tools/makeldif/MakeLDIF.java b/opendj-server-legacy/src/main/java/org/opends/server/tools/makeldif/MakeLDIF.java
index 73a570e..4c41cbf 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/tools/makeldif/MakeLDIF.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/tools/makeldif/MakeLDIF.java
@@ -96,7 +96,24 @@
}
}
-
+ /**
+ * Provides the command-line arguments to the main application for
+ * processing and returns the exit code as an integer.
+ *
+ * @param args
+ * The set of command-line arguments provided to this
+ * program.
+ * @param outStream
+ * The output stream for standard output.
+ * @param errStream
+ * The output stream for standard error.
+ * @return Zero to indicate that the program completed successfully,
+ * or non-zero to indicate that an error occurred.
+ */
+ public static int main(final String[] args, final OutputStream outStream, final OutputStream errStream)
+ {
+ return new MakeLDIF().makeLDIFMain(args, false, false, outStream, errStream);
+ }
/**
* Creates a new instance of this utility. It should just be used for
@@ -217,8 +234,7 @@
}
catch (ArgumentException ae)
{
- printWrappedText(err, ERR_ERROR_PARSING_ARGS.get(ae.getMessage()));
- err.println(argParser.getUsage());
+ argParser.displayMessageAndUsageReference(err, ERR_ERROR_PARSING_ARGS.get(ae.getMessage()));
return 1;
}
--
Gitblit v1.10.0