summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-04-17 22:18:48 -0400
committerJames Moger <james.moger@gitblit.com>2014-04-17 23:08:07 -0400
commitb37af4dacfde09036245e9d5542692850d0c7775 (patch)
tree6ba62f34057c7a17c5d2003663a10608f9dfe7e0 /src/main/java
parent9ee8b1b793113e74a2fffc1e2aa764279d1c686d (diff)
downloadgitblit-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.java4
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);