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

Mike Drob updated SOLR-8392:
----------------------------
    Attachment: SOLR-8392.patch

I'm not sure we can do that since updateTimeoutSecs is a class field. One 
request could set it, and the next request could not specify it and current 
behaviour would be to continue to use the first value. Indiscriminately 
overwriting it would be a change. However, I do think we can use getInt on the 
change in SchemaHandler.

Regarding MapSolrParams, I suspect this class was created before Java 
introduced generics, so it might have some rough edges with type safety. I'm 
not sure what to do about {{getParams}} but it looks like {{get}} can be 
simplified quite a bit. Some cursory analysis makes me think that returning a 
single-element array for {{getParams}} is totally fine, and it meets the API 
contract to return an array with all (one) elements.

> SolrParam.get(String) returns String and shouldn't be used in other 
> instanceof checks
> -------------------------------------------------------------------------------------
>
>                 Key: SOLR-8392
>                 URL: https://issues.apache.org/jira/browse/SOLR-8392
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Mike Drob
>             Fix For: Trunk
>
>         Attachments: SOLR-8392.patch, SOLR-8392.patch
>
>
> There's a couple of places where we declare the return type of 
> solrParams.get() as an Object and then do instanceof checks for other types. 
> Since we know it will be a String, we can simplify this logic in several 
> places.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to