Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Pursehouse2017-12-06 23:25:50 +0000
committerDavid Pursehouse2017-12-06 23:42:13 +0000
commita7e20cc77fba99bf7243d1c0a48082a6a7398fa8 (patch)
tree81e16df34621afe0490c0c71af22eb2093c80ea6 /org.eclipse.jgit.lfs.server.test
parent34d56fd277584c9e14b7f468377a72a9587ba650 (diff)
downloadjgit-a7e20cc77fba99bf7243d1c0a48082a6a7398fa8.tar.gz
jgit-a7e20cc77fba99bf7243d1c0a48082a6a7398fa8.tar.xz
jgit-a7e20cc77fba99bf7243d1c0a48082a6a7398fa8.zip
FileLfsServlet: Do not pretty print json response
Pretty printing the response is useful for human readers, but most (if not all) of the time, the response will be read by programs. Remove it to avoid the additional overhead of the formatting and extra bytes in the response. Adjust the test accordingly. Note that LfsProtocolServlet already doesn't use pretty printing, so this change makes FileLfsServlet's behavior consistent. In fact, both classes now have duplicate Gson handling; this will be cleaned up in a separate change. Change-Id: I113a23403f9222f16e2c0ddf39461398b721d064 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.lfs.server.test')
-rw-r--r--org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/DownloadTest.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/DownloadTest.java b/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/DownloadTest.java
index f92e638e80..69d1a04801 100644
--- a/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/DownloadTest.java
+++ b/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/DownloadTest.java
@@ -129,7 +129,7 @@ public class DownloadTest extends LfsServerTest {
long start = System.nanoTime();
long len = getContent(id, f2);
System.out.println(
- MessageFormat.format("dowloaded 10 MiB random data in {0}ms",
+ MessageFormat.format("downloaded 10 MiB random data in {0}ms",
(System.nanoTime() - start) / 1e6));
assertEquals(expectedLen, len);
FileUtils.delete(f.toFile(), FileUtils.RETRY);
@@ -138,7 +138,7 @@ public class DownloadTest extends LfsServerTest {
@SuppressWarnings("boxing")
private String formatErrorMessage(int status, String message) {
- return String.format("Status: %d {\n \"message\": \"%s\"\n}", status,
+ return String.format("Status: %d {\"message\":\"%s\"}", status,
message);
}
}

Back to the top