lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject [lucene-solr] branch master updated: SOLR-14691: Fix a minor back-compat formatting issue.
Date Wed, 07 Oct 2020 18:47:15 GMT
This is an automated email from the ASF dual-hosted git repository.

ab pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/master by this push:
     new 969f9c1  SOLR-14691: Fix a minor back-compat formatting issue.
969f9c1 is described below

commit 969f9c189942f860217005882cba1378c898d22f
Author: Andrzej Bialecki <ab@apache.org>
AuthorDate: Wed Oct 7 20:46:13 2020 +0200

    SOLR-14691: Fix a minor back-compat formatting issue.
---
 solr/solrj/src/java/org/apache/solr/common/util/Utils.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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 c05ce23..86bef91 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
@@ -234,13 +234,14 @@ public class Utils {
         startObject();
         final boolean[] first = new boolean[1];
         first[0] = true;
+        int sz = mapWriter._size();
         mapWriter._forEachEntry((k, v) -> {
           if (first[0]) {
             first[0] = false;
           } else {
             writeValueSeparator();
           }
-          indent();
+          if (sz > 1) indent();
           writeString(k.toString());
           writeNameSeparator();
           write(v);


Mime
View raw message