DiffAlgorithms: Open Repository in try-with-resource
Change-Id: I67cb486283213f8aa964333533c55966518baa36 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
This commit is contained in:
parent
6d437a58f1
commit
e466548235
|
@ -160,11 +160,8 @@ protected void run() throws Exception {
|
||||||
else
|
else
|
||||||
rb.findGitDir(dir);
|
rb.findGitDir(dir);
|
||||||
|
|
||||||
Repository repo = rb.build();
|
try (Repository repo = rb.build()) {
|
||||||
try {
|
|
||||||
run(repo);
|
run(repo);
|
||||||
} finally {
|
|
||||||
repo.close();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue