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-211) Cloning Option is now breaking our code
Date Fri, 29 Oct 2010 09:56:21 GMT

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

Emmanuel Bourg updated CLI-211:
-------------------------------

          Environment:     (was: win 2000)
    Affects Version/s: 1.2
        Fix Version/s:     (was: 1.2)

Sorry for this incompatible change Markus, the cloning was necessary to fix CLI-137. The options
created when the interface is defined can't be used to receive the result of the parsing,
because the parser may create several instances of the same option. The proper way to retrieve
the result is to query the CommandLine returned by the parser.

> Cloning Option is now breaking our code
> ---------------------------------------
>
>                 Key: CLI-211
>                 URL: https://issues.apache.org/jira/browse/CLI-211
>             Project: Commons CLI
>          Issue Type: Bug
>          Components: CLI-1.x
>    Affects Versions: 1.2
>            Reporter: markus k
>            Priority: Minor
>
> In out code we create new options and put them in a member variable of a class like this:
> Option valuesOption = options.addOption("opt1", true, "Description.").getOption("opt1");
> this.memberOpt = valuesOption;
> Later in our code we requested the value with this.memberOpt.getValue(), which worked
good on 1.1.
> With 1.2 all of our code does not work anymore using this mechanism.
> I guess this happens due to the change of Revision 667565 which now clones the Option.
> This is not got, since all references to the original options given to the parser now
do not get their values anymore.

-- 
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