diff options
author | Dave Borowitz <dborowitz@google.com> | 2017-12-20 12:16:40 -0500 |
---|---|---|
committer | Dave Borowitz <dborowitz@google.com> | 2017-12-20 12:16:40 -0500 |
commit | f63ee965d4f6990a25628c1aac452f4cbf8a69dd (patch) | |
tree | cb81d94894ab8bbf901217baa9c55b877670594e | |
parent | 1e56842742ebd42e46206b0a870d24217e5a7be8 (diff) | |
download | jgit-f63ee965d4f6990a25628c1aac452f4cbf8a69dd.tar.gz jgit-f63ee965d4f6990a25628c1aac452f4cbf8a69dd.zip |
ObjectInserter: Add warning about mixing read-back with writes
Change-Id: Ib0460d3c7df315d86f9adca5f66a8fd4c39e4060
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java index 857ec9b2df..b2ffbe6f6f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java @@ -423,6 +423,13 @@ public abstract class ObjectInserter implements AutoCloseable { * <p> * The returned reader should return this inserter instance from {@link * ObjectReader#getCreatedFromInserter()}. + * <p> + * Behavior is undefined if an insert method is called on the inserter in the + * middle of reading from an {@link ObjectStream} opened from this reader. For + * example, reading the remainder of the object may fail, or newly written + * data may even be corrupted. Interleaving whole object reads (including + * streaming reads) with inserts is fine, just not interleaving streaming + * <em>partial</em> object reads with inserts. * * @since 3.5 * @return reader for any object, including an object recently inserted by |