tflobbe opened a new pull request, #1931:
URL: https://github.com/apache/solr/pull/1931

   The translation between V1 parameters into the new code based in V2 APIs is 
using `StrUtils.getBool(String param)` to parse from string. This 
`StrUtils.getBool` is intended to be more flexible than 
`Boolean.parseBoolean()`, and accepts things like `yes`/`no`, `on`/`off`, but 
it's case sensitive.
   
   This PR makes it case insensitive. Note that this code is often used for 
reading configuration files, so those will also now be case insensitive when 
this is merged. 
   An alternative could be to have a new method to be case insensitive and use 
that one for the API parameters, but really, if this code is supposed to be 
more flexible than `Boolean.parseBoolean()`, I think make it case insensitive 
is the right way to go.
   
   I was also a bit surprised that this code uses `startsWith`, for the most 
part, which sounds strange to me (maybe intended to allow trailing whitespaces? 
I'm not sure), but that could be a discussion for a different PR (changing that 
would be a breaking change)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to