Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-16368

Refactoring: Use SolrClient type instead of overly specific subclasses

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • main (10.0), 9.2
    • None
    • None

    Description

      There are many references to a specific SolrClient subclass that could simply refer to SolrClient generally, or perhaps CloudSolrClient. This impedes switching/migrating to different SolrClient implementations. A similar example: we know it's a bad practice to declare a List as ArrayList even when it is one; the idea here with SolrClient is the same.

      And furthermore, often times "var solrClient = ..." (or even "var solr = ...") is totally adequate in the Solr codebase within a method because the variable name adequately communicates the type. These sorts of changes should happen first, and then weaken type references in APIs.

      Attachments

        Issue Links

          Activity

            People

              epugh Eric Pugh
              dsmiley David Smiley
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 15.5h
                  15.5h