summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-04-17 22:17:57 -0400
committerJames Moger <james.moger@gitblit.com>2014-04-17 23:08:07 -0400
commit3e31e26a90b0f90321bc05af07c20c91659d926c (patch)
treef36fe241cc7901cad0cbf2ca8d20f4a094f59ee7 /src
parent58309e6a726e089bdd8a8b68a9140cd14965db65 (diff)
downloadgitblit-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.java4
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();