commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simone Tripodi (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FILEUPLOAD-229) toLowerCase() is Locale-dependent; should use toLowerCase(Locale.ENGLISH) instead
Date Tue, 12 Mar 2013 18:51:14 GMT

    [ https://issues.apache.org/jira/browse/FILEUPLOAD-229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13600325#comment-13600325
] 

Simone Tripodi commented on FILEUPLOAD-229:
-------------------------------------------

+1 for {{equalsIgnoreCase(String)}}
                
> toLowerCase() is Locale-dependent; should use toLowerCase(Locale.ENGLISH) instead
> ---------------------------------------------------------------------------------
>
>                 Key: FILEUPLOAD-229
>                 URL: https://issues.apache.org/jira/browse/FILEUPLOAD-229
>             Project: Commons FileUpload
>          Issue Type: Bug
>            Reporter: Sebb
>
> toLowerCase() is Locale-dependent - as is toUpperCase().
> For comparisons, can often use equalsIgnoreCase(String) instead.
> If an actual lower/upper case is required, then should use a fixed locale (unless the
code is intended to use the default locale, which is quite unusual for Commons)
> A suitable locale is Locale.ENGLISH as that behaves well with ASCII and ISO-8859-1.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message