commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Bourg (JIRA)" <j...@apache.org>
Subject [jira] Updated: (CLI-167) Support options like Java memory settings (-Xmx512M)
Date Sat, 30 May 2009 13:54:07 GMT

     [ https://issues.apache.org/jira/browse/CLI-167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Emmanuel Bourg updated CLI-167:
-------------------------------

    Description: 
This is a RFE to implement the java memory setting style of option, that is a single hyphen
with a long option name and a value immediately after.

For example: -Xmx512M

{code}
public void testJavaMemorySettings() throws Exception {
    Options options = new Options();
    options.addOption(OptionBuilder.withLongOpt("Xmx").hasArg().create("Xmx"));

    Parser parser = new GnuParser();
    CommandLine cl = parser.parse(options, new  String[] { "-Xmx512M" });

    assertTrue(cl.hasOption("Xmx"));
    assertEquals("512M", cl.getOptionValue("Xmx"));
}
{code}

  was:
This is a RFE to implement the java memory setting style of option, that is a single hyphen
with a long option name and a value immediately after.

For example: -Xmx512M

{code}
public void testJavaMemorySettings() throws Exception {
    Options options = new Options();
    options.addOption(OptionBuilder.withLongOpt("Xmx").create("Xmx"));

    Parser parser = new GnuParser();
    CommandLine cl = parser.parse(options, new  String[] { "-Xmx512M" });

    assertTrue(cl.hasOption("Xmx"));
    assertEquals("512M", cl.getOptionValue("Xmx"));
}
{code}


> Support options like Java memory settings (-Xmx512M)
> ----------------------------------------------------
>
>                 Key: CLI-167
>                 URL: https://issues.apache.org/jira/browse/CLI-167
>             Project: Commons CLI
>          Issue Type: Improvement
>          Components: Parser
>            Reporter: Emmanuel Bourg
>            Assignee: Emmanuel Bourg
>            Priority: Minor
>             Fix For: 1.3
>
>
> This is a RFE to implement the java memory setting style of option, that is a single
hyphen with a long option name and a value immediately after.
> For example: -Xmx512M
> {code}
> public void testJavaMemorySettings() throws Exception {
>     Options options = new Options();
>     options.addOption(OptionBuilder.withLongOpt("Xmx").hasArg().create("Xmx"));
>     Parser parser = new GnuParser();
>     CommandLine cl = parser.parse(options, new  String[] { "-Xmx512M" });
>     assertTrue(cl.hasOption("Xmx"));
>     assertEquals("512M", cl.getOptionValue("Xmx"));
> }
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message