summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.junit/src/org
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@gmail.com>2019-04-04 19:59:52 +0900
committerMatthias Sohn <matthias.sohn@sap.com>2019-04-08 01:13:01 +0200
commitee32ca226e9a4aa2ff48bfdd1ba1d2184317c668 (patch)
tree55e94c47d8b0f87ceaa0f99e93e55c9362bb7323 /org.eclipse.jgit.junit/src/org
parent9c2ef2d71e0bac8e06583bc73a25dad410cba660 (diff)
downloadjgit-ee32ca226e9a4aa2ff48bfdd1ba1d2184317c668.tar.gz
jgit-ee32ca226e9a4aa2ff48bfdd1ba1d2184317c668.zip
LocalDiskRepositoryTestCase: Clarify semantics of repository creation methods
Several of the utility methods create a Repository without setting the 'autoClose' flag, which means that the caller is responsible for closing it. Update the Javadoc to explicitly mention this. Change-Id: I2410dd8d230cd4519f756c38b17141d0daa6c314 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.junit/src/org')
-rw-r--r--org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java12
1 files changed, 9 insertions, 3 deletions
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 4b2eadf418..8e999da6b3 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
@@ -366,7 +366,9 @@ public abstract class LocalDiskRepositoryTestCase {
/**
* Creates a new empty bare repository.
*
- * @return the newly created repository, opened for access
+ * @return the newly created bare repository, opened for access. The
+ * repository will not be closed in {@link #tearDown()}; the caller
+ * is responsible for closing it.
* @throws IOException
* the repository could not be created in the temporary area
*/
@@ -377,7 +379,9 @@ public abstract class LocalDiskRepositoryTestCase {
/**
* Creates a new empty repository within a new empty working directory.
*
- * @return the newly created repository, opened for access
+ * @return the newly created repository, opened for access. The repository
+ * will not be closed in {@link #tearDown()}; the caller is
+ * responsible for closing it.
* @throws IOException
* the repository could not be created in the temporary area
*/
@@ -391,7 +395,9 @@ public abstract class LocalDiskRepositoryTestCase {
* @param bare
* true to create a bare repository; false to make a repository
* within its working directory
- * @return the newly created repository, opened for access
+ * @return the newly created repository, opened for access. The repository
+ * will not be closed in {@link #tearDown()}; the caller is
+ * responsible for closing it.
* @throws IOException
* the repository could not be created in the temporary area
* @since 5.3