Could not format default value for log formats (#25910)
Closes #25908 Signed-off-by: Martin Bartoš <mabartos@redhat.com>
This commit is contained in:
parent
1e29bc99c0
commit
55d0a32b09
1 changed files with 4 additions and 1 deletions
|
@ -638,7 +638,10 @@ public final class Picocli {
|
|||
transformedDesc.append(" Possible values are: " + String.join(", ", mapper.getExpectedValues()) + ".");
|
||||
}
|
||||
|
||||
mapper.getDefaultValue().map(d -> " Default: " + d + ".").ifPresent(transformedDesc::append);
|
||||
mapper.getDefaultValue()
|
||||
.map(d -> d.toString().replaceAll("%", "%%")) // escape formats
|
||||
.map(d -> " Default: " + d + ".")
|
||||
.ifPresent(transformedDesc::append);
|
||||
|
||||
mapper.getDeprecatedMetadata().ifPresent(deprecatedMetadata -> {
|
||||
List<String> deprecatedDetails = new ArrayList<>();
|
||||
|
|
Loading…
Reference in a new issue