summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorClemens Fuchslocher <clemens@vakuumverpackt.de>2011-02-26 19:14:43 +0100
committerClemens Fuchslocher <clemens@vakuumverpackt.de>2011-02-26 19:29:06 +0100
commit813f1dea6d5bddbe545dca94792dbfe576e9f44e (patch)
tree079bafc9ff2a95d778a3cf91b9fbe2a38d2715b3 /java
parent514d791dd8602ad1d70d45a824927aafe44e838c (diff)
downloadjson-813f1dea6d5bddbe545dca94792dbfe576e9f44e.tar.gz
flori/json#60: Incorrect pretty-print indentation
Diffstat (limited to 'java')
-rw-r--r--java/src/json/ext/Generator.java6
1 files changed, 1 insertions, 5 deletions
diff --git a/java/src/json/ext/Generator.java b/java/src/json/ext/Generator.java
index 230d68f..de476c9 100644
--- a/java/src/json/ext/Generator.java
+++ b/java/src/json/ext/Generator.java
@@ -354,11 +354,7 @@ public final class Generator {
state.decreaseDepth();
if (objectNl.length() != 0) {
buffer.append(objectNl);
- if (indent.length != 0) {
- for (int i = 0; i < state.getDepth(); i++) {
- buffer.append(indent);
- }
- }
+ buffer.append(Utils.repeat(state.getIndent(), state.getDepth()));
}
buffer.append((byte)'}');
}