You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2007/11/20 16:53:43 UTC

[jira] Created: (SOLR-416) need to audit all methods that might be using default Locale

need to audit all methods that might be using default Locale
------------------------------------------------------------

                 Key: SOLR-416
                 URL: https://issues.apache.org/jira/browse/SOLR-416
             Project: Solr
          Issue Type: Bug
            Reporter: Hoss Man


As discussed on the mailing list, there are places in Solr where java methods that rely on the default locale are used to copare input with "constants" ... the specific use case that prompted this bug being string comparison after calling "toUpperCase()" ... this won't do what it should in some Locales...

http://www.nabble.com/Invalid-value-%27explicit%27-for-echoParams-parameter-tf4837914.html

we should audit the code as much as possible and try to replace these use cases in a way that will work for everyone....

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-416) need to audit all methods that might be using default Locale

Posted by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-416?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shalin Shekhar Mangar updated SOLR-416:
---------------------------------------

    Fix Version/s: 1.5

> need to audit all methods that might be using default Locale
> ------------------------------------------------------------
>
>                 Key: SOLR-416
>                 URL: https://issues.apache.org/jira/browse/SOLR-416
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Hoss Man
>             Fix For: 1.5
>
>
> As discussed on the mailing list, there are places in Solr where java methods that rely on the default locale are used to copare input with "constants" ... the specific use case that prompted this bug being string comparison after calling "toUpperCase()" ... this won't do what it should in some Locales...
> http://www.nabble.com/Invalid-value-%27explicit%27-for-echoParams-parameter-tf4837914.html
> we should audit the code as much as possible and try to replace these use cases in a way that will work for everyone....

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-416) need to audit all methods that might be using default Locale

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12543932 ] 

Yonik Seeley commented on SOLR-416:
-----------------------------------

I personally hate case insensitivity for parameters.... if not explicitly documented and used, or if it was added after Solr 1.2, I'd vote to kill it.

Character.toLower/toUpper aren't locale aware.
String.equalsIgnoreCase() uses Character.toLower/toUpper which aren't local aware and would be fine for comparisons against a known string.


> need to audit all methods that might be using default Locale
> ------------------------------------------------------------
>
>                 Key: SOLR-416
>                 URL: https://issues.apache.org/jira/browse/SOLR-416
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Hoss Man
>
> As discussed on the mailing list, there are places in Solr where java methods that rely on the default locale are used to copare input with "constants" ... the specific use case that prompted this bug being string comparison after calling "toUpperCase()" ... this won't do what it should in some Locales...
> http://www.nabble.com/Invalid-value-%27explicit%27-for-echoParams-parameter-tf4837914.html
> we should audit the code as much as possible and try to replace these use cases in a way that will work for everyone....

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-416) need to audit all methods that might be using default Locale

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12543924 ] 

Hoss Man commented on SOLR-416:
-------------------------------

FWIW: 'grep -r "toUpper\|toLower" java webapp' shows 32 places where toUpper or toLower are used ... that's probably where we should start trying to fix things ... there may be other equally heinous Locale aware comparisons being done that don't involve these methods.




> need to audit all methods that might be using default Locale
> ------------------------------------------------------------
>
>                 Key: SOLR-416
>                 URL: https://issues.apache.org/jira/browse/SOLR-416
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Hoss Man
>
> As discussed on the mailing list, there are places in Solr where java methods that rely on the default locale are used to copare input with "constants" ... the specific use case that prompted this bug being string comparison after calling "toUpperCase()" ... this won't do what it should in some Locales...
> http://www.nabble.com/Invalid-value-%27explicit%27-for-echoParams-parameter-tf4837914.html
> we should audit the code as much as possible and try to replace these use cases in a way that will work for everyone....

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.