]> source.dussan.org Git - gitblit.git/commitdiff
[findbugs] Null check on logging merge change in patchset receive pack
authorJames Moger <james.moger@gitblit.com>
Fri, 18 Apr 2014 02:13:59 +0000 (22:13 -0400)
committerJames Moger <james.moger@gitblit.com>
Fri, 18 Apr 2014 03:08:07 +0000 (23:08 -0400)
src/main/java/com/gitblit/git/PatchsetReceivePack.java

index 43efc54a3e4a1bcea873d920fed978ff45f4dcaa..f7412a346cac4f2ec98fcb58aa81437ef2b0fb60 100644 (file)
@@ -536,8 +536,10 @@ public class PatchsetReceivePack extends GitblitReceivePack {
                                                break;\r
                                        }\r
                                }\r
-                               sendError("Sorry, {0} already merged {1} from ticket {2,number,0} to {3}!",\r
+                               if (mergeChange != null) {\r
+                                       sendError("Sorry, {0} already merged {1} from ticket {2,number,0} to {3}!",\r
                                                mergeChange.author, mergeChange.patchset, number, ticket.mergeTo);\r
+                               }\r
                                sendRejection(cmd, "Ticket {0,number,0} already resolved", number);\r
                                return null;\r
                        } else if (!StringUtils.isEmpty(ticket.mergeTo)) {\r