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

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

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6, 4.0-ALPHA
    • Component/s: None
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: