Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-2795

@Option annotation class missing documentation

    Details

    • Type: Documentation
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.0
    • Fix Version/s: 4.0.0.M3
    • Component/s: None
    • Labels:
      None

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              chris@die-schneider.net Christian Schneider
              Reporter:
              amichai Amichai Rothman
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: