You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Guillaume Nodet (JIRA)" <ji...@apache.org> on 2014/05/13 14:46:18 UTC

[jira] [Comment Edited] (KARAF-2795) @Option annotation class missing documentation

    [ https://issues.apache.org/jira/browse/KARAF-2795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13996327#comment-13996327 ] 

Guillaume Nodet edited comment on KARAF-2795 at 5/13/14 12:44 PM:
------------------------------------------------------------------

Fwiw, it would be nice to provide full syntax coverage, i.e.  {{-name <myname>}} and "--force=false" for booleans.



was (Author: gnt):
Fwiw, it would be nice to provide full syntax coverage, i.e.  "-name <myname>" and "--force=false" for booleans.


> @Option annotation class missing documentation
> ----------------------------------------------
>
>                 Key: KARAF-2795
>                 URL: https://issues.apache.org/jira/browse/KARAF-2795
>             Project: Karaf
>          Issue Type: Documentation
>    Affects Versions: 3.0.0
>            Reporter: Amichai Rothman
>            Assignee: Christian Schneider
>            Priority: Minor
>             Fix For: 4.0.0
>
>
> The @Option annotation used in defining custom shell commands is missing javadocs describing its behavior. For one, its options have no explanation. Further, its effect on fields of different types is undocumented: when applied to a boolean field, it is treated as a switch with no value (e.g. --verbose) and the field is set according to whether the switch is specified or not, but when applied to a field of any other type it requires a value (e.g. --user username), and the command fails if a value is not provided. The field in this case receives the value converted to the field type (though this is typically just an unconverted String).
> All of this should be documented in the Option class javadoc so that it can be used properly.



--
This message was sent by Atlassian JIRA
(v6.2#6252)