From 4e057d6392c4b771b585832069b0354daa83ef15 Mon Sep 17 00:00:00 2001 From: Houston Putman Date: Mon, 17 Jul 2023 16:45:33 -0400 Subject: [PATCH] SOLR-16891: Fix blank Cloud graph screen in UI (#1783) * MapWriter and IteratorWriter should not be special cases for JSON writing * DocCollection, Slice and Replica now write to Json and write to Maps identically. (cherry picked from commit 952a7be422b1173683c1b70fc407b93b13cfb6f1) --- solr/CHANGES.txt | 2 ++ solr/solrj/src/java/org/apache/solr/common/util/Utils.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index c79ff299725..5cb81e67913 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -300,6 +300,8 @@ Bug Fixes * SOLR-16753: PRS state is now always updated at the end of a splitShard. (Houston Putman, hossman) +* SOLR-16891: DocCollection, Slice and Replica now write to Json and write to Maps identically. (Houston Putman, Tomás Fernández Löbbe) + Dependency Upgrades --------------------- * PR#1744: Update software.amazon.awssdk:* to v2.20.97 (solrbot) 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 c16c8feeda5..4f28c81441e 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, 0).write(o); // indentation by default + new JSONWriter(out, 2).write(o); // indentation by default return toUTF8(out); }