From 80c3ef7b8fd0daee7e85beb6b10f8a7a40efb3de Mon Sep 17 00:00:00 2001 From: James Moger Date: Thu, 17 Apr 2014 22:13:59 -0400 Subject: [PATCH] [findbugs] Null check on logging merge change in patchset receive pack --- src/main/java/com/gitblit/git/PatchsetReceivePack.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gitblit/git/PatchsetReceivePack.java b/src/main/java/com/gitblit/git/PatchsetReceivePack.java index 43efc54a..f7412a34 100644 --- a/src/main/java/com/gitblit/git/PatchsetReceivePack.java +++ b/src/main/java/com/gitblit/git/PatchsetReceivePack.java @@ -536,8 +536,10 @@ public class PatchsetReceivePack extends GitblitReceivePack { break; } } - sendError("Sorry, {0} already merged {1} from ticket {2,number,0} to {3}!", + if (mergeChange != null) { + sendError("Sorry, {0} already merged {1} from ticket {2,number,0} to {3}!", mergeChange.author, mergeChange.patchset, number, ticket.mergeTo); + } sendRejection(cmd, "Ticket {0,number,0} already resolved", number); return null; } else if (!StringUtils.isEmpty(ticket.mergeTo)) { -- 2.39.5