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 <david.pursehouse@gmail.com>
This commit is contained in:
parent
a9a3af4af7
commit
5d0ca36d39
|
@ -364,7 +364,7 @@ private FileRepository createRepository(boolean bare) throws IOException {
|
|||
FileRepository db = new FileRepository(gitdir);
|
||||
assertFalse(gitdir.exists());
|
||||
db.create(bare);
|
||||
toClose.add(db);
|
||||
addRepoToClose(db);
|
||||
return db;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue