cpoerschke commented on code in PR #2030:
URL: https://github.com/apache/solr/pull/2030#discussion_r1397519730


##########
solr/core/src/java/org/apache/solr/rest/ManagedResourceStorage.java:
##########
@@ -421,8 +421,20 @@ public String getInfo() {
   /** Default storage implementation that uses JSON as the storage format for 
managed data. */
   public static class JsonStorage extends ManagedResourceStorage {
 
+    private final int indentSize;
+
+    /** Uses 2 space characters as an indent. */
     public JsonStorage(StorageIO storageIO, SolrResourceLoader loader) {
+      this(storageIO, loader, 2);

Review Comment:
   > if this '2' is a default parameter I would prefer to see it as a constant, 
it would be more readable
   
   
https://github.com/apache/solr/pull/2030/commits/cc4a2d44abfbdc4f151aed39b18f60769cb1f11e
 creates a `JSONWriter.DEFAULT_INDENT` constant and uses it here.
   
   Though I could also see that perhaps that's undesirable since it exposes 
`JSONWriter` implementation detail here i.e. a constant elsewhere would avoid 
that.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to