Browse Source

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>
stable-5.3
David Pursehouse 6 years ago
parent
commit
38d42d5ccd
  1. 6
      org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java

6
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;
}
/**

Loading…
Cancel
Save