diff --git a/solr/solrj/src/java/org/apache/solr/common/util/Utils.java b/solr/solrj/src/java/org/apache/solr/common/util/Utils.java index 4f28c81441e..c16c8feeda5 100644 --- a/solr/solrj/src/java/org/apache/solr/common/util/Utils.java +++ b/solr/solrj/src/java/org/apache/solr/common/util/Utils.java @@ -229,7 +229,7 @@ public static Number intIfNotOverflown(long n) { public static byte[] toJSON(Object o) { if (o == null) return new byte[0]; CharArr out = new CharArr(); - new JSONWriter(out, 2).write(o); // indentation by default + new JSONWriter(out, 0).write(o); // indentation by default return toUTF8(out); } diff --git a/solr/solrj/src/test/org/apache/solr/common/cloud/DocCollectionTest.java b/solr/solrj/src/test/org/apache/solr/common/cloud/DocCollectionTest.java index 6918f1c3135..7759803bd6e 100644 --- a/solr/solrj/src/test/org/apache/solr/common/cloud/DocCollectionTest.java +++ b/solr/solrj/src/test/org/apache/solr/common/cloud/DocCollectionTest.java @@ -107,6 +107,6 @@ public void testDocCollectionSeriallizationNoIndent() throws Exception { // sometime it takes url schems http or https - test setup issue assertTrue( - "byte size is wrong at " + ser.length, 540512 == ser.length || 540512 + 2048 == ser.length); + "byte size is wrong at " + ser.length, 540513 == ser.length || 540513 + 2048 == ser.length); } }