You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ri...@apache.org on 2010/04/14 18:15:45 UTC
svn commit: r934005 -
/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/util/CommandLineParser.java
Author: ritchiem
Date: Wed Apr 14 16:15:45 2010
New Revision: 934005
URL: http://svn.apache.org/viewvc?rev=934005&view=rev
Log:
QPID-2503 : Updated CommandLineParser to output '-' in front of options.
Modified:
qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/util/CommandLineParser.java
Modified: qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/util/CommandLineParser.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/util/CommandLineParser.java?rev=934005&r1=934004&r2=934005&view=diff
==============================================================================
--- qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/util/CommandLineParser.java (original)
+++ qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/util/CommandLineParser.java Wed Apr 14 16:15:45 2010
@@ -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");
}
}
}
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org