lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (Resolved) (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (SOLR-2920) Refactor frequent conditional use of DefaultSolrParams into SolrParams.combine(p,d)
Date Mon, 12 Dec 2011 22:59:30 GMT

     [ https://issues.apache.org/jira/browse/SOLR-2920?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Hoss Man resolved SOLR-2920.
----------------------------

       Resolution: Fixed
    Fix Version/s: 4.0
                   3.6
         Assignee: David Smiley

Committed revision 1213484. - 3x

David: thanks for the suggestion & the following through with patch!
                
> Refactor frequent conditional use of DefaultSolrParams into SolrParams.combine(p,d)
> -----------------------------------------------------------------------------------
>
>                 Key: SOLR-2920
>                 URL: https://issues.apache.org/jira/browse/SOLR-2920
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: David Smiley
>            Assignee: David Smiley
>            Priority: Minor
>             Fix For: 3.6, 4.0
>
>         Attachments: SOLR-2920_SolrParams_combine().patch, SOLR-2920_SolrParams_wrapDefaults_and_wrapAppended.patch
>
>
> 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:
> {code:java}
>     if( defaults != null ) {
>       params = new DefaultSolrParams( params, defaults );
>     }
> {code}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message