From 5d0ca36d39fda934ca3304f2227afd4f93700393 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Fri, 27 Jan 2017 12:05:12 +0900 Subject: [PATCH] LocalDiskRepositoryTestCase: Only add to toClose through access method Only using the access method means we only have one place where the toClose set is modified, making it easier to debug either by adding log statements or by setting a breakpoint. Change-Id: I4f9f1774d5f2e10bcab381edfd84bb6ee0499a11 Signed-off-by: David Pursehouse --- .../src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java index 0a6defc3e2..42e201e932 100644 --- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java +++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java @@ -364,7 +364,7 @@ public abstract class LocalDiskRepositoryTestCase { FileRepository db = new FileRepository(gitdir); assertFalse(gitdir.exists()); db.create(bare); - toClose.add(db); + addRepoToClose(db); return db; } -- 2.39.5