summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorMartin Ritchie <ritchiem@apache.org>2010-04-14 16:15:45 +0000
committerMartin Ritchie <ritchiem@apache.org>2010-04-14 16:15:45 +0000
commit8da1c5c7cf140957e95971ae4bb7e31647184a41 (patch)
tree723dda8194d2a0e2eca5d2d692ce74e08b884162 /java
parentbf920e363d1bb7be5089ace1795a142207466171 (diff)
downloadqpid-python-8da1c5c7cf140957e95971ae4bb7e31647184a41.tar.gz
QPID-2503 : Updated CommandLineParser to output '-' in front of options.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@934005 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java')
-rw-r--r--java/common/src/main/java/org/apache/qpid/util/CommandLineParser.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/java/common/src/main/java/org/apache/qpid/util/CommandLineParser.java b/java/common/src/main/java/org/apache/qpid/util/CommandLineParser.java
index baa68f87f9..0281506037 100644
--- a/java/common/src/main/java/org/apache/qpid/util/CommandLineParser.java
+++ b/java/common/src/main/java/org/apache/qpid/util/CommandLineParser.java
@@ -208,7 +208,7 @@ public class CommandLineParser
for (CommandLineOption optionInfo : optionMap.values())
{
result +=
- optionInfo.option + " " + ((optionInfo.argument != null) ? (optionInfo.argument + " ") : "")
+ "-" + optionInfo.option + " " + ((optionInfo.argument != null) ? (optionInfo.argument + " ") : "")
+ optionInfo.comment + "\n";
}
@@ -463,7 +463,7 @@ public class CommandLineParser
else if (optionInfo.mandatory && !options.containsKey(optionInfo.option))
{
// Create an error for the missing option.
- parsingErrors.add("Option " + optionInfo.option + " is mandatory but not was not specified.\n");
+ parsingErrors.add("Option -" + optionInfo.option + " is mandatory but not was not specified.\n");
}
}
@@ -597,7 +597,7 @@ public class CommandLineParser
if (!argumentMatcher.matches())
{
// Create an error for this badly formed argument.
- parsingErrors.add("The argument to option " + optionInfo.option + " does not meet its required format.\n");
+ parsingErrors.add("The argument to option -" + optionInfo.option + " does not meet its required format.\n");
}
}
}