HttpTestCase#fsck: Open TestRepository in try-with-resource

Change-Id: Ibda8c9970322871abf0fcf1244977bed04eaedd2
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
This commit is contained in:
David Pursehouse 2019-01-20 14:42:42 +09:00
parent 6df350ee0e
commit b465657238
1 changed files with 4 additions and 3 deletions

View File

@ -186,9 +186,10 @@ protected List<AccessEvent> getRequests(String path) {
*/
protected static void fsck(Repository db, RevObject... tips)
throws Exception {
TestRepository<? extends Repository> tr =
new TestRepository<>(db);
tr.fsck(tips);
try (TestRepository<? extends Repository> tr =
new TestRepository<>(db)) {
tr.fsck(tips);
}
}
/**