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

Refactor frequent conditional use of DefaultSolrParams into SolrParams.combine(p,d)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 3.6, 4.0-ALPHA
    • None
    • None

    Description

      I had a small bug in use of DefaultSolrParams in my code because I didn't check for non-existent defaults. I noticed through the Solr codebase that is code pattern is very common:

          if( defaults != null ) {
            params = new DefaultSolrParams( params, defaults );
          }
      

      Instead, I refactored this logic into a new SolrParams.combine(p,d) method and made it so that nobody refers to DefaultSolrParams. I did similarly for AppendedSolrParams.

      Attachments

        Activity

          People

            dsmiley David Smiley
            dsmiley David Smiley
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: