summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-04-17 22:13:59 -0400
committerJames Moger <james.moger@gitblit.com>2014-04-17 23:08:07 -0400
commit80c3ef7b8fd0daee7e85beb6b10f8a7a40efb3de (patch)
tree8cf21afb65e6cf2e7247eb2bf1daf8a15d0c60a0
parent1fb5424b5532ff58ac6c55510d87d5674cc5d89b (diff)
downloadgitblit-80c3ef7b8fd0daee7e85beb6b10f8a7a40efb3de.tar.gz
gitblit-80c3ef7b8fd0daee7e85beb6b10f8a7a40efb3de.zip
[findbugs] Null check on logging merge change in patchset receive pack
-rw-r--r--src/main/java/com/gitblit/git/PatchsetReceivePack.java4
1 files changed, 3 insertions, 1 deletions
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)) {