Picocli 3.9.1
Picocli 3.9.1
The picocli community is pleased to announce picocli 3.9.1.
The picocli.AutoComplete
application no longer calls System.exit()
unless requested by setting system property picocli.autocomplete.systemExitOnError
or picocli.autocomplete.systemExitOnSuccess
to any value other than false
. Applications that rely on the exit codes introduced in picocli 3.9.0 need to set these system properties.
This release adds support for quoted map keys with embedded '=' characters.
This release contains bugfixes and enhancements.
This is the forty-sixth public release.
Picocli follows semantic versioning.
Table of Contents
New and Noteworthy
Fixed issues
- [#592] Error message now shows
enum
constant names, nottoString()
values, after value mismatch. Thanks to startewho for the bug report. - [#591] Replace some String concatenation in
picocli.AutoComplete
with StringBuilder. Thanks to Sergio Escalante for the pull request. - [#594] Add support for quoted map keys with embedded '=' characters. Thanks to Pubudu Fernando for the suggestion.
- [#596]
picocli.AutoComplete
should not callSystem.exit()
unless requested. Thanks to Markus Heiden, Bob Tiernay and RobertZenz for analysis and ideas contributing to the solution. - [#593] Use Gradle Bintray Plugin to publish artifacts to Bintray.
Deprecations
No features were deprecated in this release.
Potential breaking changes
The picocli.AutoComplete
application no longer calls System.exit()
unless requested by setting system property picocli.autocomplete.systemExitOnError
or picocli.autocomplete.systemExitOnSuccess
to any value other than false
.
Applications that rely on the exit codes introduced in picocli 3.9.0 need to set these system properties.
The new support for quoted map keys with embedded '=' characters [#594] may inpact some existing applications.
If CommandLine::setTrimQuotes()
is set to true
, quotes are now removed from map keys and map values. This did not use to be the case.
For example:
class App {
@Option(names = "-p") Map<String, String> map;
}
When CommandLine::setTrimQuotes()
was set to true
, given input like the below:
-p AppOptions="-Da=b -Dx=y"
The above used to result in a map with key AppOptions
and value "-Da=b -Dx=y"
(including the quotes), but the same program and input now results in a map with key AppOptions
and value -Da=b -Dx=y
(without quotes).
Also, when CommandLine::setTrimQuotes()
is false
(the default), input like the below will now cause a ParameterException
("value should be in KEY=VALUE format"):
-p "AppOptions=-Da=b -Dx=y"
Prior to this release, the above was silently ignored (no errors but also no key-value pairs in the resulting map).