]> source.dussan.org Git - jgit.git/commitdiff
CloneCommand#setCallback should return 'this' 93/98393/4
authorDavid Pursehouse <david.pursehouse@gmail.com>
Thu, 1 Jun 2017 04:49:58 +0000 (13:49 +0900)
committerMatthias Sohn <matthias.sohn@sap.com>
Thu, 8 Jun 2017 20:45:33 +0000 (22:45 +0200)
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>
org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java

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