summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorShawn Pearce <sop@google.com>2014-11-25 09:53:57 -0800
committerShawn Pearce <sop@google.com>2014-11-25 10:21:48 -0800
commit61b632ee5a915cb5e30676aab4349402bcd8196f (patch)
treec0f5276040ac8032d89d6cd7fe573ca3cd346ea8 /org.eclipse.jgit
parent4206ea43b81eadf5c3e9d80cf286968cb134a45c (diff)
downloadjgit-61b632ee5a915cb5e30676aab4349402bcd8196f.tar.gz
jgit-61b632ee5a915cb5e30676aab4349402bcd8196f.zip
Deprecate TemporaryBuffer.LocalFile without parent directory
Encourage callers to explicitly name a directory to hold any overflow data. Call sites have more information about what is going into the buffer and how it should be protected at the filesystem level than just throwing content to the system wide temporary directory. Callers that still really don't care (or need to care) can pass null for the File argument to have the system directory used. Change-Id: I89009bbee49d3850d42cd82c2c462e51043acda0
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/TemporaryBuffer.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/TemporaryBuffer.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/TemporaryBuffer.java
index 88c32d2f53..10aade4e11 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/TemporaryBuffer.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/TemporaryBuffer.java
@@ -361,7 +361,12 @@ public abstract class TemporaryBuffer extends OutputStream {
*/
private File onDiskFile;
- /** Create a new temporary buffer. */
+ /**
+ * Create a new temporary buffer.
+ *
+ * @deprecated Use the {@code File} overload to supply a directory.
+ */
+ @Deprecated
public LocalFile() {
this(null, DEFAULT_IN_CORE_LIMIT);
}
@@ -372,7 +377,9 @@ public abstract class TemporaryBuffer extends OutputStream {
* @param inCoreLimit
* maximum number of bytes to store in memory. Storage beyond
* this limit will use the local file.
+ * @deprecated Use the {@code File,int} overload to supply a directory.
*/
+ @Deprecated
public LocalFile(final int inCoreLimit) {
this(null, inCoreLimit);
}