Skip to content

Commit

Permalink
#168 setSeparator method should return CommandLine
Browse files Browse the repository at this point in the history
Closes #168.
  • Loading branch information
remkop committed Aug 17, 2017
1 parent 6e42e36 commit cbf736c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions RELEASE-NOTES.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
== 1.0.0 - (Work in progress) Public release

* (Work in progress) #121 Added support for command line complete: picocli can generate bash completion scripts that generate completion matches based on `@Option` and `@Command` annotations.
* #67 Support options for Map fields like `-Dkey1=val1 -Dkey2=val2`
* #164 Support format patterns in version string and printVersionHelp
* #166 Fixed bug where adjacent markup sections resulted in incorrect ANSI escape sequences
* #167 Change `@Option(type=Class)` attribute from `Class` to `Class[]`
* #67 Support options for Map fields like `-Dkey1=val1 -Dkey2=val2`
* #167 Change `type` attribute from `Class` to `Class[]` for Map support
* #168 API change: `CommandLine::setSeparator` method now returns this CommandLine (was void)

== 0.9.8 - Bugfix and enhancements release for public review. API may change.

Expand Down
6 changes: 4 additions & 2 deletions src/main/java/picocli/CommandLine.java
Original file line number Diff line number Diff line change
Expand Up @@ -583,9 +583,11 @@ public String getSeparator() {
}

/** Sets the String the parser uses to separate option names from option values to the specified value.
* @param separator the String that separates option names from option values */
public void setSeparator(String separator) {
* @param separator the String that separates option names from option values
* @return this {@code CommandLine} object, to allow method chaining */
public CommandLine setSeparator(String separator) {
interpreter.separator = Assert.notNull(separator, "separator");
return this;
}
private static boolean empty(String str) { return str == null || str.trim().length() == 0; }
private static boolean empty(Object[] array) { return array == null || array.length == 0; }
Expand Down

0 comments on commit cbf736c

Please sign in to comment.