summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/exttst/org/eclipse
diff options
context:
space:
mode:
authorShawn O. Pearce <sop@google.com>2009-11-26 20:16:30 -0800
committerShawn O. Pearce <spearce@spearce.org>2010-01-12 11:56:55 -0800
commit3f8fdc03253264cae2172c168b5c959ea09a4c9d (patch)
tree5a1e46a1a78cdd3c52121e2a594b847933138bcb /org.eclipse.jgit.test/exttst/org/eclipse
parenta22b8f5fac9dd9b99333d709e6ef8f09ca6cd0d7 (diff)
downloadjgit-3f8fdc03253264cae2172c168b5c959ea09a4c9d.tar.gz
jgit-3f8fdc03253264cae2172c168b5c959ea09a4c9d.zip
Refactor TemporaryBuffer to support reuse in other contexts
Later we are going to add support for smart HTTP, which requires us to buffer at least some of the request created by a client before we ship it to the server. For many requests, we can fit it completely into a 1 MiB buffer, but if it doesn't we can drop back to using the chunked transfer encoding to send an unknown stream length. Rather than recoding the block based memory buffer, we refactor the local file overflow strategy into a subclass, allowing the HTTP client code to replace this portion of the logic with its own approach to start the chunked encoding request. Change-Id: Iac61ea1017b14e0ad3c4425efc3d75718b71bb8e Signed-off-by: Shawn O. Pearce <sop@google.com>
Diffstat (limited to 'org.eclipse.jgit.test/exttst/org/eclipse')
-rw-r--r--org.eclipse.jgit.test/exttst/org/eclipse/jgit/patch/EGitPatchHistoryTest.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.jgit.test/exttst/org/eclipse/jgit/patch/EGitPatchHistoryTest.java b/org.eclipse.jgit.test/exttst/org/eclipse/jgit/patch/EGitPatchHistoryTest.java
index 60d3853d85..ae9fb0ef50 100644
--- a/org.eclipse.jgit.test/exttst/org/eclipse/jgit/patch/EGitPatchHistoryTest.java
+++ b/org.eclipse.jgit.test/exttst/org/eclipse/jgit/patch/EGitPatchHistoryTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008, Google Inc.
+ * Copyright (C) 2008-2009, Google Inc.
* and other copyright owners as documented in the project's IP log.
*
* This program and the accompanying materials are made available
@@ -211,7 +211,7 @@ public class EGitPatchHistoryTest extends TestCase {
buf.destroy();
}
commitId = line.substring("commit ".length());
- buf = new TemporaryBuffer();
+ buf = new TemporaryBuffer.LocalFile();
} else if (buf != null) {
buf.write(line.getBytes("ISO-8859-1"));
buf.write('\n');