diff options
-rw-r--r-- | org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/DownloadTest.java | 4 | ||||
-rw-r--r-- | org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/FileLfsServlet.java | 9 |
2 files changed, 6 insertions, 7 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); } } diff --git a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/FileLfsServlet.java b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/FileLfsServlet.java index a8e3c11e27..b13beb5953 100644 --- a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/FileLfsServlet.java +++ b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/FileLfsServlet.java @@ -211,10 +211,9 @@ public class FileLfsServlet extends HttpServlet { } private static Gson createGson() { - GsonBuilder gb = new GsonBuilder() - .setFieldNamingPolicy( - FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES) - .setPrettyPrinting().disableHtmlEscaping(); - return gb.create(); + return new GsonBuilder() + .setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES) + .disableHtmlEscaping() + .create(); } } |