Browse Source

CloneCommand#setCallback should return 'this'

The other methods in this class follow the builder pattern, and
return 'this', allowing multiple method calls to be chained in a
single statement.

Update the setCallback method to do the same.

Change-Id: I0366d28bf66ba47f08ee7eee636d613c9fe079f5
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
stable-4.8
David Pursehouse 8 years ago committed by Matthias Sohn
parent
commit
9c7b95684c
  1. 4
      org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java

4
org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java

@ -611,10 +611,12 @@ public class CloneCommand extends TransportCommand<CloneCommand, Git> {
* *
* @param callback * @param callback
* the callback * the callback
* @return {@code this}
* @since 4.8 * @since 4.8
*/ */
public void setCallback(Callback callback) { public CloneCommand setCallback(Callback callback) {
this.callback = callback; this.callback = callback;
return this;
} }
private static void validateDirs(File directory, File gitDir, boolean bare) private static void validateDirs(File directory, File gitDir, boolean bare)

Loading…
Cancel
Save