From 16ef06d210bec7dd5b44d82f70d9f7bb9e4dbf6f Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Thu, 01 May 2014 14:26:28 -0400
Subject: [PATCH] Documentation
---
src/main/java/com/gitblit/utils/JGitUtils.java | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/main/java/com/gitblit/utils/JGitUtils.java b/src/main/java/com/gitblit/utils/JGitUtils.java
index 0cee70d..190872a 100644
--- a/src/main/java/com/gitblit/utils/JGitUtils.java
+++ b/src/main/java/com/gitblit/utils/JGitUtils.java
@@ -2256,8 +2256,10 @@
}
} catch (IOException e) {
LOGGER.error("Failed to determine canMerge", e);
- } finally {
- revWalk.release();
+ } finally {
+ if (revWalk != null) {
+ revWalk.release();
+ }
}
return MergeStatus.NOT_MERGEABLE;
}
@@ -2347,8 +2349,10 @@
}
} catch (IOException e) {
LOGGER.error("Failed to merge", e);
- } finally {
- revWalk.release();
+ } finally {
+ if (revWalk != null) {
+ revWalk.release();
+ }
}
return new MergeResult(MergeStatus.FAILED, null);
}
--
Gitblit v1.9.1