Browse Source

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

Change-Id: Ibda8c9970322871abf0fcf1244977bed04eaedd2
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
stable-5.4
David Pursehouse 6 years ago
parent
commit
b465657238
  1. 5
      org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/HttpTestCase.java

5
org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/HttpTestCase.java

@ -186,10 +186,11 @@ public abstract class HttpTestCase extends LocalDiskRepositoryTestCase {
*/
protected static void fsck(Repository db, RevObject... tips)
throws Exception {
TestRepository<? extends Repository> tr =
new TestRepository<>(db);
try (TestRepository<? extends Repository> tr =
new TestRepository<>(db)) {
tr.fsck(tips);
}
}
/**
* Mirror refs

Loading…
Cancel
Save