aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Pearce <spearce@spearce.org>2017-08-08 06:44:35 -0700
committerShawn Pearce <spearce@spearce.org>2017-08-08 06:44:35 -0700
commit22201e8cca3b2b1f6df71fb1053c7358a9a2d72f (patch)
tree5e43a0dd21efda49bef1ee842f5ed7253b96e491
parent8bbe34f27cfed0ddaf1bc10a2d65248739a03fb0 (diff)
downloadjgit-22201e8cca3b2b1f6df71fb1053c7358a9a2d72f.tar.gz
jgit-22201e8cca3b2b1f6df71fb1053c7358a9a2d72f.zip
Update thread-safety warning about Repository
Change-Id: I1026a77cc688467d5a89a41121146f1bd3d56fa5
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java
index 1f2ab9df87..72f79f4a9c 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java
@@ -106,7 +106,13 @@ import org.slf4j.LoggerFactory;
* A repository holds all objects and refs used for managing source code (could
* be any type of file, but source code is what SCM's are typically used for).
* <p>
- * This class is thread-safe.
+ * The thread-safety of a {@link Repository} very much depends on the concrete
+ * implementation. Applications working with a generic {@code Repository} type
+ * must not assume the instance is thread-safe.
+ * <ul>
+ * <li>{@code FileRepository} is thread-safe.
+ * <li>{@code DfsRepository} thread-safety is determined by its subclass.
+ * </ul>
*/
public abstract class Repository implements AutoCloseable {
private static final Logger LOG = LoggerFactory.getLogger(Repository.class);