andywebb1975 commented on code in PR #2454:
URL: https://github.com/apache/solr/pull/2454#discussion_r1597474808


##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpJdkSolrClient.java:
##########
@@ -299,10 +299,19 @@ private PreparedRequest preparePutOrPost(
       InputStream is = streams.iterator().next().getStream();
       bodyPublisher = HttpRequest.BodyPublishers.ofInputStream(() -> is);
     } else if (queryParams != null && urlParamNames != null) {
-      ModifiableSolrParams requestParams = queryParams;
-      queryParams = calculateQueryParams(urlParamNames, requestParams);
-      queryParams.add(calculateQueryParams(solrRequest.getQueryParams(), 
requestParams));
-      bodyPublisher = 
HttpRequest.BodyPublishers.ofString(requestParams.toString());
+      // move params specified in urlParamNames from queryParams into urlParams
+      ModifiableSolrParams urlParams = calculateQueryParams(urlParamNames, 
queryParams);
+
+      // note this is only triggered if urlParamNames is set too - this this 
correct?
+      urlParams.add(calculateQueryParams(solrRequest.getQueryParams(), 
queryParams));

Review Comment:
   `queryParams` can't be null either, can it? I've made this the `else` block 
- I added an `UnsupportedOperationException` in the original `noBody()` one and 
saw it was never triggered by tests. Does this change look good to you?



-- 
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

Reply via email to