[
https://issues.apache.org/jira/browse/SOLR-9184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15937823#comment-15937823
]
ASF subversion and git services commented on SOLR-9184:
-------------------------------------------------------
Commit bcd452c6a1026bcec814e355b8366c9b4ece49e0 in lucene-solr's branch
refs/heads/branch_6x from koji
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=bcd452c ]
SOLR-9184: Add a static convenience method ModifiableSolrParams#of(SolrParams)
which returns the same instance if it already is modifiable, otherwise creates
a new ModifiableSolrParams instance.
> Add convenience method to ModifiableSolrParams
> ----------------------------------------------
>
> Key: SOLR-9184
> URL: https://issues.apache.org/jira/browse/SOLR-9184
> Project: Solr
> Issue Type: Improvement
> Components: SolrJ
> Reporter: Jörg Rathlev
> Assignee: Koji Sekiguchi
> Priority: Minor
> Attachments: SOLR-9184.patch, SOLR-9184.patch
>
>
> Add a static convenience method {{ModifiableSolrParams#of(SolrParams)}} which
> returns the same instance if it already is modifiable, otherwise creates a
> new {{ModifiableSolrParams}} instance.
> Rationale: when writing custom SearchComponents, we find that we often need
> to ensure that the SolrParams are modifiable. The copy constructor of
> ModifiableSolrParams always creates a copy, even if the SolrParms already are
> modifiable.
> Alternatives: The method could also be added as a convenience method in
> SolrParams itself, which already has static helper methods for wrapDefaults
> and wrapAppended.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]