dsmiley commented on code in PR #2856: URL: https://github.com/apache/solr/pull/2856#discussion_r1839376359
########## solr/core/src/java/org/apache/solr/util/DataConfigNode.java: ########## @@ -54,31 +53,17 @@ public DataConfigNode(ConfigNode root) { e.setValue(List.copyOf(e.getValue())); } } - this.kids = kids.isEmpty() ? EMPTY : new WrappedSimpleMap<>(Map.copyOf(kids)); + this.kids = Map.copyOf(kids); } - public String subtituteVal(String s) { + private static String substituteVal(String s) { return PropertiesUtil.substitute(s, SUBSTITUTES.get()); Review Comment: Okay; I'll file a pair of JIRA issues tomorrow if you don't first: * Replace ConfigNode.SUBSTITUTES (ThreadLocal); redesign * Rename NamedList.asMap to something like toMapRecursively ########## solr/core/src/java/org/apache/solr/cli/CreateTool.java: ########## @@ -167,10 +166,9 @@ protected void createCore(CommandLine cli, SolrClient solrClient) throws Excepti String coreRootDirectory; // usually same as solr home, but not always - Map<String, Object> systemInfo = - solrClient - .request(new GenericSolrRequest(SolrRequest.METHOD.GET, CommonParams.SYSTEM_INFO_PATH)) - .asMap(); Review Comment: needless asMap call. @epugh you added this code a year ago, maybe because you don't like NamedList? ########## solr/core/src/java/org/apache/solr/cli/ApiTool.java: ########## @@ -98,7 +98,7 @@ protected String callGet(String url, String credentials) throws Exception { NamedList<Object> response = solrClient.request(req); // pretty-print the response to stdout CharArr arr = new CharArr(); - new JSONWriter(arr, 2).write(response.asMap()); + new JSONWriter(arr, 2).write(response.asShallowMap()); Review Comment: I'll change this back with another or two. I now understand that asMap recursively does Map conversion, which is required for JSON conversion which doesn't know how to process a NamedList inside. Granted we could use Jackson and register a converter but that's out of scope. -- 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: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org