dsmiley commented on code in PR #2259:
URL: https://github.com/apache/solr/pull/2259#discussion_r1509879152


##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrJdkClient.java:
##########
@@ -268,13 +258,14 @@ private HttpResponse<InputStream> doPutOrPost(
       bodyPublisher = HttpRequest.BodyPublishers.noBody();
     }
 
+    decorateRequest(reqb, solrRequest);
     if (method == SolrRequest.METHOD.PUT) {
-      reqb.PUT(bodyPublisher);
+      reqb.method("PUT", bodyPublisher);
     } else {
-      reqb.POST(bodyPublisher);
+      reqb.method("POST", bodyPublisher);

Review Comment:
   could use one line (no if-else) via method.toString to get the string of the 
method



##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrJdkClient.java:
##########
@@ -287,6 +278,64 @@ private HttpResponse<InputStream> doPutOrPost(
     return response;
   }
 
+  private volatile boolean headRequested;
+  private volatile boolean headSucceeded;

Review Comment:
   volatile isn't needed because it's only accessed by one method (which ought 
to be mentioned in a comment so this invariant holds)



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