diff --git a/solr/core/src/java/org/apache/solr/cli/ApiTool.java b/solr/core/src/java/org/apache/solr/cli/ApiTool.java index c1887cfbc14..2bce06a70ab 100644 --- a/solr/core/src/java/org/apache/solr/cli/ApiTool.java +++ b/solr/core/src/java/org/apache/solr/cli/ApiTool.java @@ -98,7 +98,7 @@ protected String callGet(String url, String credentials) throws Exception { NamedList response = solrClient.request(req); // pretty-print the response to stdout CharArr arr = new CharArr(); - new JSONWriter(arr, 2).write(response.asShallowMap()); + new JSONWriter(arr, 2).write(response.asMap(10)); return arr.toString(); } } diff --git a/solr/core/src/java/org/apache/solr/cli/CreateTool.java b/solr/core/src/java/org/apache/solr/cli/CreateTool.java index 071b37dc6af..babfaf1d74d 100644 --- a/solr/core/src/java/org/apache/solr/cli/CreateTool.java +++ b/solr/core/src/java/org/apache/solr/cli/CreateTool.java @@ -319,7 +319,7 @@ protected void createCollection(CloudSolrClient cloudSolrClient, CommandLine cli if (isVerbose()) { // pretty-print the response to stdout CharArr arr = new CharArr(); - new JSONWriter(arr, 2).write(response.asShallowMap()); + new JSONWriter(arr, 2).write(response.asMap(10)); echo(arr.toString()); } String endMessage = diff --git a/solr/core/src/test/org/apache/solr/search/facet/SpatialHeatmapFacetsTest.java b/solr/core/src/test/org/apache/solr/search/facet/SpatialHeatmapFacetsTest.java index 185e9693860..da2a76a3141 100644 --- a/solr/core/src/test/org/apache/solr/search/facet/SpatialHeatmapFacetsTest.java +++ b/solr/core/src/test/org/apache/solr/search/facet/SpatialHeatmapFacetsTest.java @@ -156,8 +156,7 @@ public void testClassicFacets() throws Exception { // AKA SimpleFacets assertTrue( ((NamedList) response.getResponse().findRecursive("facet_counts", "facet_heatmaps", "course")) - .asMap(0) - .containsKey("counts_" + courseFormat)); + .get("counts_" + courseFormat) != null); } // ------ Index data diff --git a/solr/solrj/src/java/org/apache/solr/common/ConfigNode.java b/solr/solrj/src/java/org/apache/solr/common/ConfigNode.java index 64e5ec8ce0f..18022605f69 100644 --- a/solr/solrj/src/java/org/apache/solr/common/ConfigNode.java +++ b/solr/solrj/src/java/org/apache/solr/common/ConfigNode.java @@ -195,7 +195,7 @@ public String txt() { @Override public Map attributes() { - return empty_attrs; + return Map.of(); } @Override @@ -232,8 +232,6 @@ public boolean isNull() { public void forEachChild(Function fun) {} }; - Map empty_attrs = Map.of(); - class Helpers { static boolean _bool(Object v, boolean def) { return v == null ? def : Boolean.parseBoolean(v.toString());