diff options
author | James Moger <james.moger@gitblit.com> | 2014-04-17 22:18:48 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-04-17 23:08:07 -0400 |
commit | b37af4dacfde09036245e9d5542692850d0c7775 (patch) | |
tree | 6ba62f34057c7a17c5d2003663a10608f9dfe7e0 /src/main/java | |
parent | 9ee8b1b793113e74a2fffc1e2aa764279d1c686d (diff) | |
download | gitblit-b37af4dacfde09036245e9d5542692850d0c7775.tar.gz gitblit-b37af4dacfde09036245e9d5542692850d0c7775.zip |
[findbugs] Null check on closing a repository in TicketNotifier
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/com/gitblit/tickets/TicketNotifier.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/com/gitblit/tickets/TicketNotifier.java b/src/main/java/com/gitblit/tickets/TicketNotifier.java index 48fe051f..9a5e4e1d 100644 --- a/src/main/java/com/gitblit/tickets/TicketNotifier.java +++ b/src/main/java/com/gitblit/tickets/TicketNotifier.java @@ -204,7 +204,9 @@ public class TicketNotifier { } catch (Exception e) { Logger.getLogger(getClass()).error("failed to get changed paths", e); } finally { - repo.close(); + if (repo != null) { + repo.close(); + } } String compareUrl = ticketService.getCompareUrl(ticket, base, patchset.tip); |