epugh commented on code in PR #1211:
URL: https://github.com/apache/solr/pull/1211#discussion_r1039871082


##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttp2SolrClient.java:
##########
@@ -88,23 +89,63 @@ public LBHttp2SolrClient(Http2SolrClient httpClient, 
String... baseSolrUrls) {
     this.httpClient = httpClient;
   }
 
+  public LBHttp2SolrClient(Http2SolrClient httpClient, List<String> 
baseSolrUrls, Builder builder) {
+    super(baseSolrUrls);
+    this.httpClient = httpClient;
+    if (builder.responseParser != null) {
+      this.parser = builder.responseParser;
+    }
+    if (builder.requestWriter != null) {
+      this.httpClient.setRequestWriter(builder.requestWriter);
+    }
+  }
+
   @Override
   protected SolrClient getClient(String baseUrl) {
     return httpClient;
   }
 
+  /**
+   * Note: This setter method is <b>not thread-safe</b>.
+   *
+   * @param parser Default Response Parser chosen to parse the response if the 
parser were not
+   *     specified as part of the request.
+   * @see org.apache.solr.client.solrj.SolrRequest#getResponseParser()
+   * @deprecated use {@link 
LBHttp2SolrClient.Builder#withResponseParser(ResponseParser)} instead
+   */
+  @Deprecated
   @Override
   public void setParser(ResponseParser parser) {
     super.setParser(parser);
     this.httpClient.setParser(parser);
   }
 
+  @Override
+  public ResponseParser getParser() {
+    return httpClient.getParser();

Review Comment:
   Okay, so, just to be clear, I'm going to remove those two methods on the 
LBSolrClient...    In this PR ;-).     I like removing code!!!!



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