Change-Id: Id4cb9a236dddfc674b55e9e7037329a885455288
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
*/
public BlameResult call() throws GitAPIException {
checkCallable();
- BlameGenerator gen = new BlameGenerator(repo, path);
- try {
+ try (BlameGenerator gen = new BlameGenerator(repo, path)) {
if (diffAlgorithm != null)
gen.setDiffAlgorithm(diffAlgorithm);
if (textComparator != null)
return gen.computeBlameResult();
} catch (IOException e) {
throw new JGitInternalException(e.getMessage(), e);
- } finally {
- gen.release();
}
}