summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@gmail.com>2018-12-18 11:57:20 +0900
committerDavid Pursehouse <david.pursehouse@gmail.com>2018-12-19 15:31:38 +0900
commit38d42d5ccd911a44ef789e71f0efcff0351eca85 (patch)
tree8285d19db58d38541a7518d363c8cf9a976d46a6
parentfc07fa26b9b9e2b0f89111aea498a08ff09c7167 (diff)
downloadjgit-38d42d5ccd911a44ef789e71f0efcff0351eca85.tar.gz
jgit-38d42d5ccd911a44ef789e71f0efcff0351eca85.zip
UploadPack: Rewrite setAdvertiseRefsHook to use ternary operator
This makes the implementation consistent with the other similar methods in this class. Change-Id: I007876aad883615d696c8eabc886818ae00b10ee Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
index 9d90057293..78bf0fe47b 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
@@ -573,10 +573,8 @@ public class UploadPack {
*/
public void setAdvertiseRefsHook(
@Nullable AdvertiseRefsHook advertiseRefsHook) {
- if (advertiseRefsHook != null)
- this.advertiseRefsHook = advertiseRefsHook;
- else
- this.advertiseRefsHook = AdvertiseRefsHook.DEFAULT;
+ this.advertiseRefsHook = advertiseRefsHook != null ? advertiseRefsHook
+ : AdvertiseRefsHook.DEFAULT;
}
/**