summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@gmail.com>2016-08-12 22:26:26 +0900
committerDavid Pursehouse <david.pursehouse@gmail.com>2016-08-16 11:00:54 +0900
commit59b96549a6518876e49bb5dbf1aa2b63e3f759c7 (patch)
treeb0c805d720acf72c183094ebd0a5acdc5668f087 /org.eclipse.jgit.lfs.server/src/org/eclipse/jgit
parentca2bf6fc183ce2ccefeb5a8bf0b59340da1529aa (diff)
downloadjgit-59b96549a6518876e49bb5dbf1aa2b63e3f759c7.tar.gz
jgit-59b96549a6518876e49bb5dbf1aa2b63e3f759c7.zip
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 <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.lfs.server/src/org/eclipse/jgit')
-rw-r--r--org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LfsProtocolServlet.java9
1 files 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 1aa8c04058..984e4a962d 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();
}
}