jgit/org.eclipse.jgit.junit
David Pursehouse 52923e9b07 LocalDiskRepositoryTestCase#createRepository: Default auto-close to false
Since 8ed59c5 ("Make TestRepository AutoCloseable", Jan 11, 2019) the
TestRepository class is auto-closeable, but instantiations of it were
not converted to use try-with-resource.

Converting to try-with-resource results, in several cases, in the
repository being closed twice because LocalDiskRepositoryTestCase has
logic to close created repositories in the tearDown method. This results
in several tests emitting a warning to the console:

  close() called when useCnt is already zero

Change the default behavior of the createRepository method to not use
the auto-close logic in LocalDiskRepositoryTestCase, so that thy will
instead be closed (only once) using the AutoCloseable implementation.

Deprecate the method that has the autoClose parameter.

Change-Id: I63d62c9913f9b61271667861dae144e551d358c1
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-01-20 20:09:16 +09:00
..
.settings Disable Eclipse warning about unrecognized @SuppressWarnings value 2018-10-17 10:40:36 +09:00
META-INF Prepare 5.3.0-SNAPSHOT builds 2018-12-03 02:32:49 +01:00
src/org/eclipse/jgit/junit LocalDiskRepositoryTestCase#createRepository: Default auto-close to false 2019-01-20 20:09:16 +09:00
.classpath Fix test setup for Eclipse Photon and greater 2018-11-02 18:50:26 +01:00
.gitignore Finish removing Apache Felix maven-bundle-plugin 2010-01-12 11:46:55 -08:00
.project Enforce the use of Java5 API:s only (with a few exceptions) 2011-12-16 01:01:36 +01:00
BUILD Move SshTestGitServer to new bundle org.eclipse.jgit.junit.ssh 2018-11-17 07:28:08 -08:00
build.properties Partial revert "Switch build to Apache Felix maven-bundle-plugin" 2010-01-10 15:59:03 +01:00
plugin.properties Fix plugin provider names to conform with release train requirement 2013-04-08 23:05:36 +02:00
pom.xml Prepare 5.3.0-SNAPSHOT builds 2018-12-03 02:32:49 +01:00