Skip to content

Commit

Permalink
[#222] Register default converter for Object fields for better script…
Browse files Browse the repository at this point in the history
…ing support.

Closes #222
  • Loading branch information
remkop committed Oct 29, 2017
1 parent 5f8244a commit e1c45d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- [#220] Improve tracing for positional parameters (provide detail on current position).
- [#221] Document workaround for Grapes bug on Groovy versions before 2.4.7.
- [#222] Register default converter for Object fields for better scripting support.

# <a name="2.0.1"></a> Picocli 2.0.1

Expand Down
1 change: 1 addition & 0 deletions src/main/java/picocli/CommandLine.java
Original file line number Diff line number Diff line change
Expand Up @@ -1857,6 +1857,7 @@ private class Interpreter {
private int position;

Interpreter(Object command) {
converterRegistry.put(Object.class, new BuiltIn.StringConverter());
converterRegistry.put(String.class, new BuiltIn.StringConverter());
converterRegistry.put(StringBuilder.class, new BuiltIn.StringBuilderConverter());
converterRegistry.put(CharSequence.class, new BuiltIn.CharSequenceConverter());
Expand Down

0 comments on commit e1c45d9

Please sign in to comment.