From 59b96549a6518876e49bb5dbf1aa2b63e3f759c7 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Fri, 12 Aug 2016 22:26:26 +0900 Subject: [PATCH] LfsProtocolServlet: Don't set pretty printing on Gson Pretty printing is only used for outputting json content, which is interpreted by the client and does not need to be pretty printed. Change-Id: I48e0280241b6b0f5706300ae0f4c9bc461a89110 Signed-off-by: David Pursehouse --- .../org/eclipse/jgit/lfs/server/LfsProtocolServlet.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LfsProtocolServlet.java b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LfsProtocolServlet.java index 1aa8c0405..984e4a962 100644 --- a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LfsProtocolServlet.java +++ b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LfsProtocolServlet.java @@ -183,10 +183,9 @@ public abstract class LfsProtocolServlet extends HttpServlet { } private 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(); } }