From ffc5589bc6a1a18d017f2f2de94e77cf99c4b9ca Mon Sep 17 00:00:00 2001 From: Marko Mackic Date: Sun, 17 Oct 2021 21:33:45 +0200 Subject: [PATCH] Revert "[#1308] DOC: improve text for default values; RELEASE-NOTES" This reverts commit edb7e457290443a8b6f1abab01ee86c31d5f1a0c. --- RELEASE-NOTES.md | 2 +- docs/index.adoc | 2 -- docs/index.html | 3 --- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 6dddf2f4f..60b20a363 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -26,7 +26,7 @@ Picocli follows [semantic versioning](http://semver.org/). * [#1304] DOC: Manual, chapter '17.9 Inherited Command Attributes': added Kotlin version of code sample. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. * [#1305] DOC: Document use of `IParameterConsumer` as n-ary type converter. Thanks to [Martin](https://github.com/martlin2cz) for raising this. * [#1307] DOC: Added CAUTION admonitions, Kotlin code sample. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request. -* [#1308] DOC: Add example for Option `converter`, improve text for default values. Thanks to [Abhijit Sarkar](https://github.com/asarkar) for raising this. +* [#1308] DOC: Add example for Option `converter`. ## Deprecations No features were deprecated in this release. diff --git a/docs/index.adoc b/docs/index.adoc index 0fdde9d75..17c4f66ec 100644 --- a/docs/index.adoc +++ b/docs/index.adoc @@ -1751,8 +1751,6 @@ Enum value matching is case-sensitive by default, but as of picocli 3.4 this can == Default Values It is possible to define a default value for an option or positional parameter, that is assigned when the user did not specify this option or positional parameter on the command line. -Configuring a default value guarantees that the `@Option` or `@Parameters`-annotated field will get set, annotated method will get called, and, when using the programmatic API, that the https://picocli.info/apidocs/picocli/CommandLine.Model.ArgSpec.html#setValue-T-[`ArgSpec.setValue`] method will get invoked, even when the option or positional parameter was not specified on the command line. - [#defaultValue-annotation] === `defaultValue` Annotation The recommended way to give an option or positional parameter a default value is to use the `defaultValue` annotation attribute. This works correctly with argument groups, `@Option` and `@Parameters`-annotated methods, and allows annotation processors to detect and use default values. diff --git a/docs/index.html b/docs/index.html index 086c405ea..eca43b80b 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4405,9 +4405,6 @@

5. Defaul

It is possible to define a default value for an option or positional parameter, that is assigned when the user did not specify this option or positional parameter on the command line.

-
-

Configuring a default value guarantees that the @Option or @Parameters-annotated field will get set, annotated method will get called, and, when using the programmatic API, that the ArgSpec.setValue method will get invoked, even when the option or positional parameter was not specified on the command line.

-

5.1. defaultValue Annotation