Browse Source

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>
stable-4.7
David Pursehouse 8 years ago committed by Matthias Sohn
parent
commit
5d0ca36d39
  1. 2
      org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java

2
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;
}

Loading…
Cancel
Save