Skip to content

Commit

Permalink
Re-adding 0 indentation of doc colleciton JSON and fixing test (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Sweeney authored Sep 1, 2023
1 parent 75f01bf commit e93c954
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion solr/solrj/src/java/org/apache/solr/common/util/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit e93c954

Please sign in to comment.