You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "markus k (JIRA)" <ji...@apache.org> on 2010/10/28 15:54:24 UTC
[jira] Created: (CLI-211) Cloning Option is now breaking our code
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
Environment: win 2000
Reporter: markus k
Priority: Minor
Fix For: 1.2
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.
[jira] Closed: (CLI-211) Cloning Option is now breaking our code
Posted by "markus k (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CLI-211?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
markus k closed CLI-211.
------------------------
Resolution: Won't Fix
Well, I guess we have to change our code then :-(
> 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.
[jira] Updated: (CLI-211) Cloning Option is now breaking our code
Posted by "Emmanuel Bourg (JIRA)" <ji...@apache.org>.
[ 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.