Bug 58781 - Command line option "-?" shows Unknown option

Bugzilla Id: 58781

git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1722157 13f79535-47bb-0310-9956-ffa450edef68

Former-commit-id: 04ba97a97d
This commit is contained in:
Philippe Mouawad 2015-12-29 15:41:19 +00:00
parent 6896e2e54a
commit eb8c4495e7
2 changed files with 6 additions and 0 deletions

View File

@ -119,6 +119,7 @@ public class JMeter implements JMeterPlugin {
private static final int PROXY_PASSWORD = 'a';// $NON-NLS-1$
private static final int JMETER_HOME_OPT = 'd';// $NON-NLS-1$
private static final int HELP_OPT = 'h';// $NON-NLS-1$
private static final int OPTIONS_OPT = '?';// $NON-NLS-1$
// jmeter.log
private static final int JMLOGFILE_OPT = 'j';// $NON-NLS-1$
// sample result log file
@ -157,6 +158,8 @@ public class JMeter implements JMeterPlugin {
* </ul>
*/
private static final CLOptionDescriptor[] options = new CLOptionDescriptor[] {
new CLOptionDescriptor("?", CLOptionDescriptor.ARGUMENT_DISALLOWED, OPTIONS_OPT,
"print command line options and exit"),
new CLOptionDescriptor("help", CLOptionDescriptor.ARGUMENT_DISALLOWED, HELP_OPT,
"print usage information and exit"),
new CLOptionDescriptor("version", CLOptionDescriptor.ARGUMENT_DISALLOWED, VERSION_OPT,
@ -371,6 +374,8 @@ public class JMeter implements JMeterPlugin {
System.out.println("Version " + JMeterUtils.getJMeterVersion());
} else if (parser.getArgumentById(HELP_OPT) != null) {
System.out.println(JMeterUtils.getResourceFileAsText("org/apache/jmeter/help.txt"));// $NON-NLS-1$
} else if (parser.getArgumentById(OPTIONS_OPT) != null) {
System.out.println(CLUtil.describeOptions(options).toString());
} else if (parser.getArgumentById(SERVER_OPT) != null) {
// Start the server
try {

View File

@ -239,6 +239,7 @@ Summary
<li><bug>58293</bug>SOAP/XML-RPC Sampler file browser generates NullPointerException</li>
<li><bug>58685</bug>JDatefield : Make the modification of the date with up/down arrow work.Contributed by Benoit Wiart (benoit dot wiart at gmail.com)</li>
<li><bug>58693</bug>Fix "Cannot nest output folder 'jmeter/build/components' inside output folder 'jmeter/build' when setting up eclipse</li>
<li><bug>58781</bug>Command line option "-?" shows Unknown option</li>
</ul>
<!-- =================== Thanks =================== -->