[jira] [Comment Edited] (OFBIZ-10632) ‘String#toLowercase()’ and ‘String#toUppercase()’ should be used when possible

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Comment Edited] (OFBIZ-10632) ‘String#toLowercase()’ and ‘String#toUppercase()’ should be used when possible

Nicolas Malin (Jira)

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

Mathieu Lirzin edited comment on OFBIZ-10632 at 10/28/18 7:20 PM:
------------------------------------------------------------------

Hello Jacques,

Hum I see.  If I understand the FindBug report correctly, I think it suggests using a fixed locale like {{Locale.ROOT}} for reproducible results. Passing {{Locale.getDefault()}} doesn't change/fix anything.


was (Author: mthl):
Hello Jacques,

Hum I see.  If I understand the FindBug report correctly, I think it suggests using a fixed locale like {{Locale.ROOT for reproducible results. P}}assing {{Locale.getDefault()}} doesn't change/fix anything.

> ‘String#toLowercase()’ and ‘String#toUppercase()’ should be used when possible
> ------------------------------------------------------------------------------
>
>                 Key: OFBIZ-10632
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-10632
>             Project: OFBiz
>          Issue Type: Improvement
>    Affects Versions: Trunk
>            Reporter: Mathieu Lirzin
>            Priority: Minor
>             Fix For: Upcoming Branch
>
>         Attachments: OFBIZ-10632_Use-String-toLowercase-and-String-toUppercase-when-p.patch
>
>
> Usage of {{"foo".toLowerCase()}} should be preferred to {{"foo".toLowerCase(Locale.getDefault())}} which is equivalent but more verbose. Likewise for {{toUpperCase()}}.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)