]> source.dussan.org Git - gitblit.git/commitdiff
[findbugs] Null check on closing a treewalk in BranchTicketService
authorJames Moger <james.moger@gitblit.com>
Fri, 18 Apr 2014 02:17:57 +0000 (22:17 -0400)
committerJames Moger <james.moger@gitblit.com>
Fri, 18 Apr 2014 03:08:07 +0000 (23:08 -0400)
src/main/java/com/gitblit/tickets/BranchTicketService.java

index 3a634e0553dbf92a0cc30e399c1f2d8e0a99724d..284b1be19ee0eee2de705699cc051f2fb8ce31e1 100644 (file)
@@ -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();