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


##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/PreemptiveBasicAuthClientCustomizer.java:
##########
@@ -66,15 +68,15 @@ public static void setDefaultSolrParams(SolrParams params) {
   }
 
   @Override
-  public void close() throws IOException {}
-
-  @Override
-  public void setup(Http2SolrClient client) {
+  public void setup(SolrClient client) {
+    if (client instanceof Http2SolrClient == false) {
+      return;
+    }

Review Comment:
   @gerlowskija , responding to your feedback:
   
   The code here isn't really different than the behavior today -- if you set 
the sys prop, it only applies to Http2SolrClient (Jetty).  If we start using 
this mechanism at not only the Http SolrClient level but also CloudSolrClient 
or whatever else that may or may not apply to this customizer, then it should 
skip it.  But I get your concern.  Perhaps the property should reflect the 
usage... so `solr.solrj.http.jetty.customizer` vs 
`solr.solrj.http.jdk.customizer` (hypothetical).  With this approach, the 
implementation should throw an exception if the type is wrong.  And the 
implementation should reflect it as well, like putting "Jetty" into 
`PreemptiveBasicAuthClientJettyCustomizer`.  LMK what you think; I'd prefer 
this way.



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