bszabo97 commented on code in PR #1182: URL: https://github.com/apache/solr/pull/1182#discussion_r1126310561
########## solr/core/src/java/org/apache/solr/packagemanager/PackageManager.java: ########## @@ -268,19 +270,21 @@ public Map<String, SolrPackageInstance> getPackagesDeployedAsClusterLevelPlugins MultiValuedMap<String, PluginMeta> packagePlugins = new HashSetValuedHashMap<>(); Map<String, Object> result; try { - result = - (Map<String, Object>) - Utils.executeGET( - solrClient.getHttpClient(), - solrBaseUrl + PackageUtils.CLUSTERPROPS_PATH, - Utils.JSONCONSUMER); - } catch (SolrException ex) { - if (ex.code() == ErrorCode.NOT_FOUND.code) { + NamedList<Object> response = + solrClient.request( + new GenericSolrRequest( + SolrRequest.METHOD.GET, + PackageUtils.CLUSTERPROPS_PATH, + new ModifiableSolrParams())); + Integer statusCode = (Integer) ((NamedList) response.get("responseHeader")).get("status"); Review Comment: I was not aware of the existence of this method but this helps A LOT, thank you! I was really unhappy with all these castings and `atPath` methods. Using `findRecursive` is much cleaner in these places -- 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