Copilot commented on code in PR #3505:
URL: https://github.com/apache/solr/pull/3505#discussion_r2308630038


##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/Http2SolrClient.java:
##########
@@ -291,7 +292,7 @@ private HttpClient createHttpClient(Builder builder) {
     httpClient.setExecutor(this.executor);
     httpClient.setStrictEventOrdering(false);
     httpClient.setConnectBlocking(true);
-    httpClient.setFollowRedirects(false);
+    
httpClient.setFollowRedirects(Boolean.TRUE.equals(builder.followRedirects));

Review Comment:
   The condition `Boolean.TRUE.equals(builder.followRedirects)` will be false 
when `builder.followRedirects` is null, which may not be the intended behavior. 
Consider using `builder.followRedirects != null && builder.followRedirects` or 
document the intended default behavior when followRedirects is null.
   ```suggestion
       httpClient.setFollowRedirects(builder.followRedirects != null && 
builder.followRedirects);
   ```



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

Reply via email to