dsmiley commented on code in PR #4761:
URL: https://github.com/apache/solr/pull/4761#discussion_r3837619421
##########
solr/core/src/java/org/apache/solr/packagemanager/PackageManager.java:
##########
@@ -421,16 +422,14 @@ private Pair<List<String>, List<String>>
deployCollectionPackage(
// Get package params
try {
- boolean packageParamsExist =
- solrClient
- .request(
- new GenericV2SolrRequest(
- SolrRequest.METHOD.GET,
- PackageUtils.getCollectionParamsPath(collection) +
"/packages")
- .setRequiresCollection(
- false) /* Making a collection-request, but already
baked into path */)
- .asShallowMap()
- .containsKey("params");
+ NamedList<Object> collectionParams =
+ solrClient.request(
+ new GenericV2SolrRequest(
+ SolrRequest.METHOD.GET,
+ PackageUtils.getCollectionParamsPath(collection) +
"/packages")
+ .setRequiresCollection(
+ false) /* Making a collection-request, but already
baked into path */);
+ boolean packageParamsExist = new
SimpleOrderedMap<>(collectionParams).containsKey("params");
Review Comment:
or `get` and do null check... which is Map-friendly in support of the
eventual transition to Map.
--
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]