]> source.dussan.org Git - jgit.git/commit
RepoCommandTest: Don't wrap create{Bare,Work}Directory in t-w-r 65/89665/2
authorDavid Pursehouse <david.pursehouse@gmail.com>
Fri, 27 Jan 2017 06:51:55 +0000 (15:51 +0900)
committerMatthias Sohn <matthias.sohn@sap.com>
Sat, 28 Jan 2017 16:46:27 +0000 (17:46 +0100)
commit883856110c294cd3e33d5558d4dc476d563edfe8
tree38fd658152d7e8da8b5ec0e26eaaa8db31005ccf
parent5d0ca36d39fda934ca3304f2227afd4f93700393
RepoCommandTest: Don't wrap create{Bare,Work}Directory in t-w-r

These methods add the created Repository into "toClose", and they are
then closed by LocalDiskRepositoryTestCase's tearDown method.

Calling them in try-with-resource causes them to first be closed in
the test method, and then again in tearDown, which results in the use
count going negative and a log message on the console.

While this is not a serious problem, having so many false positives
in the logs will potentially drown out real cases of Repository being
closed too many times.

Change-Id: Ib374445e101dc11cb840957b8b19ee1caf777392
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/gitrepo/RepoCommandTest.java