diff options
author | James Moger <james.moger@gitblit.com> | 2014-04-17 22:17:57 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-04-17 23:08:07 -0400 |
commit | 3e31e26a90b0f90321bc05af07c20c91659d926c (patch) | |
tree | f36fe241cc7901cad0cbf2ca8d20f4a094f59ee7 /src | |
parent | 58309e6a726e089bdd8a8b68a9140cd14965db65 (diff) | |
download | gitblit-3e31e26a90b0f90321bc05af07c20c91659d926c.tar.gz gitblit-3e31e26a90b0f90321bc05af07c20c91659d926c.zip |
[findbugs] Null check on closing a treewalk in BranchTicketService
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/gitblit/tickets/BranchTicketService.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/com/gitblit/tickets/BranchTicketService.java b/src/main/java/com/gitblit/tickets/BranchTicketService.java index 3a634e05..284b1be1 100644 --- a/src/main/java/com/gitblit/tickets/BranchTicketService.java +++ b/src/main/java/com/gitblit/tickets/BranchTicketService.java @@ -659,7 +659,9 @@ public class BranchTicketService extends ITicketService implements RefsChangedLi ticket.number, db.getDirectory()), t); } finally { // release the treewalk - treeWalk.release(); + if (treeWalk != null) { + treeWalk.release(); + } } } finally { db.close(); |