Browse Source

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>
stable-4.5
David Pursehouse 9 years ago
parent
commit
59b96549a6
  1. 9
      org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LfsProtocolServlet.java

9
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();
}
}

Loading…
Cancel
Save