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>
This commit is contained in:
parent
fc07fa26b9
commit
38d42d5ccd
|
@ -573,10 +573,8 @@ public RefFilter getRefFilter() {
|
||||||
*/
|
*/
|
||||||
public void setAdvertiseRefsHook(
|
public void setAdvertiseRefsHook(
|
||||||
@Nullable AdvertiseRefsHook advertiseRefsHook) {
|
@Nullable AdvertiseRefsHook advertiseRefsHook) {
|
||||||
if (advertiseRefsHook != null)
|
this.advertiseRefsHook = advertiseRefsHook != null ? advertiseRefsHook
|
||||||
this.advertiseRefsHook = advertiseRefsHook;
|
: AdvertiseRefsHook.DEFAULT;
|
||||||
else
|
|
||||||
this.advertiseRefsHook = AdvertiseRefsHook.DEFAULT;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue