You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by BruceKuiLiu <gi...@git.apache.org> on 2017/10/09 14:32:56 UTC

[GitHub] commons-lang pull request #297: Add a rule of Locale.ENGLISH to String.toUpp...

GitHub user BruceKuiLiu opened a pull request:

    https://github.com/apache/commons-lang/pull/297

    Add a rule of Locale.ENGLISH to String.toUpperCase() method.

    A String is being converted to upper case, using the platform's default encoding.
    This may result in improper conversions when used with international characters.
    Use the String.toUpperCase( Locale l ) version should be better.
    http://findbugs.sourceforge.net/bugDescriptions.html#DM_CONVERT_CASE

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/BruceKuiLiu/commons-lang master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/commons-lang/pull/297.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #297
    
----
commit ac6ea81247282d7fd929195040acf333cebc7b80
Author: Kui LIU <br...@gmail.com>
Date:   2017-10-09T14:01:42Z

    Add a rule of Locale.ENGLISH to String.toUpperCase() method.
    
    A String is being converted to upper case, using the platform's default encoding.
    This may result in improper conversions when used with international characters.
    Use the String.toUpperCase( Locale l ) version should be better.
    http://findbugs.sourceforge.net/bugDescriptions.html#DM_CONVERT_CASE

----


---

[GitHub] commons-lang pull request #297: Add a rule of Locale.ENGLISH to String.toUpp...

Posted by PascalSchumacher <gi...@git.apache.org>.
Github user PascalSchumacher commented on a diff in the pull request:

    https://github.com/apache/commons-lang/pull/297#discussion_r143555903
  
    --- Diff: src/main/java/org/apache/commons/lang3/time/FormatCache.java ---
    @@ -240,7 +240,7 @@ public boolean equals(final Object obj) {
                 // Eliminate the usual boilerplate because
                 // this inner static class is only used in a generic ConcurrentHashMap
                 // which will not compare against other Object types
    -            return Arrays.equals(keys, ((MultipartKey)obj).keys);
    +            return obj instanceof MultipartKey && Arrays.equals(keys, ((MultipartKey)obj).keys);
    --- End diff --
    
    Please do not include unrelated changes in a single pull request. Thanks!


---

[GitHub] commons-lang pull request #297: Add a rule of Locale.ENGLISH to String.toUpp...

Posted by BruceKuiLiu <gi...@git.apache.org>.
Github user BruceKuiLiu closed the pull request at:

    https://github.com/apache/commons-lang/pull/297


---

[GitHub] commons-lang issue #297: Add a rule of Locale.ENGLISH to String.toUpperCase(...

Posted by coveralls <gi...@git.apache.org>.
Github user coveralls commented on the issue:

    https://github.com/apache/commons-lang/pull/297
  
    
    [![Coverage Status](https://coveralls.io/builds/13632390/badge)](https://coveralls.io/builds/13632390)
    
    Coverage remained the same at 95.213% when pulling **ac6ea81247282d7fd929195040acf333cebc7b80 on BruceKuiLiu:master** into **00feb98f807cf44c993296052726043a90d70b7e on apache:master**.



---

[GitHub] commons-lang issue #297: Add a rule of Locale.ENGLISH to String.toUpperCase(...

Posted by garydgregory <gi...@git.apache.org>.
Github user garydgregory commented on the issue:

    https://github.com/apache/commons-lang/pull/297
  
    I fixed some tests and code main code here and there and I think all the changes we need are in. If you feel otherwise, please update this PR based on git master. Thank you!


---

[GitHub] commons-lang issue #297: Add a rule of Locale.ENGLISH to String.toUpperCase(...

Posted by garydgregory <gi...@git.apache.org>.
Github user garydgregory commented on the issue:

    https://github.com/apache/commons-lang/pull/297
  
    I am splitting out the FastDateParser changes here: https://issues.apache.org/jira/browse/LANG-1357


---

[GitHub] commons-lang issue #297: Add a rule of Locale.ENGLISH to String.toUpperCase(...

Posted by BruceKuiLiu <gi...@git.apache.org>.
Github user BruceKuiLiu commented on the issue:

    https://github.com/apache/commons-lang/pull/297
  
    Thanks. 


---

[GitHub] commons-lang issue #297: Add a rule of Locale.ENGLISH to String.toUpperCase(...

Posted by coveralls <gi...@git.apache.org>.
Github user coveralls commented on the issue:

    https://github.com/apache/commons-lang/pull/297
  
    
    [![Coverage Status](https://coveralls.io/builds/13632706/badge)](https://coveralls.io/builds/13632706)
    
    Coverage remained the same at 95.213% when pulling **989d02714efd99dad76380f88bbd7c430ccf92ec on BruceKuiLiu:master** into **00feb98f807cf44c993296052726043a90d70b7e on apache:master**.



---

[GitHub] commons-lang issue #297: Add a rule of Locale.ENGLISH to String.toUpperCase(...

Posted by coveralls <gi...@git.apache.org>.
Github user coveralls commented on the issue:

    https://github.com/apache/commons-lang/pull/297
  
    
    [![Coverage Status](https://coveralls.io/builds/13632652/badge)](https://coveralls.io/builds/13632652)
    
    Coverage remained the same at 95.213% when pulling **c3711c3d6d93fdc996bddc97e3dffa60f6c0119d on BruceKuiLiu:master** into **00feb98f807cf44c993296052726043a90d70b7e on apache:master**.



---

[GitHub] commons-lang pull request #297: Add a rule of Locale.ENGLISH to String.toUpp...

Posted by BruceKuiLiu <gi...@git.apache.org>.
GitHub user BruceKuiLiu reopened a pull request:

    https://github.com/apache/commons-lang/pull/297

    Add a rule of Locale.ENGLISH to String.toUpperCase() method.

    A String is being converted to upper case, using the platform's default encoding.
    This may result in improper conversions when used with international characters.
    Use the String.toUpperCase( Locale l ) version should be better.
    http://findbugs.sourceforge.net/bugDescriptions.html#DM_CONVERT_CASE

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/BruceKuiLiu/commons-lang master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/commons-lang/pull/297.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #297
    
----
commit ac6ea81247282d7fd929195040acf333cebc7b80
Author: Kui LIU <br...@gmail.com>
Date:   2017-10-09T14:01:42Z

    Add a rule of Locale.ENGLISH to String.toUpperCase() method.
    
    A String is being converted to upper case, using the platform's default encoding.
    This may result in improper conversions when used with international characters.
    Use the String.toUpperCase( Locale l ) version should be better.
    http://findbugs.sourceforge.net/bugDescriptions.html#DM_CONVERT_CASE

commit 52696462449c37ed58457aa6e8a9b63a33863608
Author: Kui LIU <br...@gmail.com>
Date:   2017-10-09T14:45:22Z

    Add a rule of Locale.ENGLISH to String.toLowerCase() method.
    
    A String is being converted to lower case, using the platform's default encoding.
    This may result in improper conversions when used with international characters.
    Use the String.toLowerCase( Locale l ) version should be better.
    http://findbugs.sourceforge.net/bugDescriptions.html#DM_CONVERT_CASE

commit e5a77b7ac0195943ee9ab5a40e826102f5b7b19a
Author: Kui LIU <br...@gmail.com>
Date:   2017-10-09T14:47:32Z

    Add a rule of Locale.ENGLISH to String.toUpperCase() method.
    
    A String is being converted to upper case, using the platform's default encoding.
    This may result in improper conversions when used with international characters.
    Use the String.toUpperCase( Locale l ) version should be better.
    http://findbugs.sourceforge.net/bugDescriptions.html#DM_CONVERT_CASE

commit c3711c3d6d93fdc996bddc97e3dffa60f6c0119d
Author: Kui LIU <br...@gmail.com>
Date:   2017-10-09T14:48:19Z

    Add a rule of Locale.ENGLISH to String.toLowerCase() method.
    
    A String is being converted to lower case, using the platform's default encoding.
    This may result in improper conversions when used with international characters.
    Use the String.toLowerCase( Locale l ) version should be better.
    http://findbugs.sourceforge.net/bugDescriptions.html#DM_CONVERT_CASE

commit 0fc92622493b45d83c05574e16a4117ae54c7d72
Author: Kui LIU <br...@gmail.com>
Date:   2017-10-09T14:49:45Z

    Add a rule of Locale.ENGLISH to String.toLowerCase() method.
    
    A String is being converted to lower case, using the platform's default encoding.
    This may result in improper conversions when used with international characters.
    Use the String.toLowerCase( Locale l ) version should be better.
    http://findbugs.sourceforge.net/bugDescriptions.html#DM_CONVERT_CASE

commit 989d02714efd99dad76380f88bbd7c430ccf92ec
Author: Kui LIU <br...@gmail.com>
Date:   2017-10-09T14:51:22Z

    Add a rule of Locale.ENGLISH to String.toUpperCase() method.
    
    A String is being converted to upper case, using the platform's default encoding.
    This may result in improper conversions when used with international characters.
    Use the String.toUpperCase( Locale l ) version should be better.
    http://findbugs.sourceforge.net/bugDescriptions.html#DM_CONVERT_CASE

commit b08cfbb3847f58a10c6dcc15ee08da3b0e2b1d6a
Author: Kui LIU <br...@gmail.com>
Date:   2017-10-09T18:04:34Z

    Add an instanceof test in the implementation of equals(Object obj) method.
    
    The equals(Object obj) method shouldn't make any assumptions about the type of obj. It should simply return false if obj is not the same type as this.
    http://findbugs.sourceforge.net/bugDescriptions.html#BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS

----


---

[GitHub] commons-lang issue #297: Add a rule of Locale.ENGLISH to String.toUpperCase(...

Posted by BruceKuiLiu <gi...@git.apache.org>.
Github user BruceKuiLiu commented on the issue:

    https://github.com/apache/commons-lang/pull/297
  
    Right, Locale.ROOT should be the most appropriate.


---

[GitHub] commons-lang pull request #297: Add a rule of Locale.ENGLISH to String.toUpp...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/commons-lang/pull/297


---

[GitHub] commons-lang issue #297: Add a rule of Locale.ENGLISH to String.toUpperCase(...

Posted by coveralls <gi...@git.apache.org>.
Github user coveralls commented on the issue:

    https://github.com/apache/commons-lang/pull/297
  
    
    [![Coverage Status](https://coveralls.io/builds/13633085/badge)](https://coveralls.io/builds/13633085)
    
    Coverage remained the same at 95.213% when pulling **37223825a39a6cb57124d529bbe65e74a024b496 on BruceKuiLiu:master** into **00feb98f807cf44c993296052726043a90d70b7e on apache:master**.



---

[GitHub] commons-lang issue #297: Add a rule of Locale.ENGLISH to String.toUpperCase(...

Posted by coveralls <gi...@git.apache.org>.
Github user coveralls commented on the issue:

    https://github.com/apache/commons-lang/pull/297
  
    
    [![Coverage Status](https://coveralls.io/builds/13632762/badge)](https://coveralls.io/builds/13632762)
    
    Coverage increased (+0.02%) to 95.233% when pulling **989d02714efd99dad76380f88bbd7c430ccf92ec on BruceKuiLiu:master** into **00feb98f807cf44c993296052726043a90d70b7e on apache:master**.



---

[GitHub] commons-lang issue #297: Add a rule of Locale.ENGLISH to String.toUpperCase(...

Posted by garydgregory <gi...@git.apache.org>.
Github user garydgregory commented on the issue:

    https://github.com/apache/commons-lang/pull/297
  
    Shouldn't this be done with Locale.ROOT?


---

[GitHub] commons-lang issue #297: Add a rule of Locale.ENGLISH to String.toUpperCase(...

Posted by coveralls <gi...@git.apache.org>.
Github user coveralls commented on the issue:

    https://github.com/apache/commons-lang/pull/297
  
    
    [![Coverage Status](https://coveralls.io/builds/13637420/badge)](https://coveralls.io/builds/13637420)
    
    Coverage remained the same at 95.213% when pulling **989d02714efd99dad76380f88bbd7c430ccf92ec on BruceKuiLiu:master** into **00feb98f807cf44c993296052726043a90d70b7e on apache:master**.



---