You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Duncan Jones (JIRA)" <ji...@apache.org> on 2014/10/08 13:38:33 UTC

[jira] [Comment Edited] (LANG-1043) isAllUpperCase should only check Alpha characters

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

Duncan Jones edited comment on LANG-1043 at 10/8/14 11:38 AM:
--------------------------------------------------------------

I've changed this to an improvement, rather than a bug, since the Javadocs explain the current behaviour correctly.

We could potentially overload this method with:

{code:java}
boolean isAllUpperCase(CharSequence cs, boolean ignoreNonLetters)
{code}

And only check characters that pass a {{Character.isLetter()}} test. The existing method would then invoke {{isAllUpperCase(cs,false)}}.


was (Author: dmjones500):
I've changed this to an improvement, rather than a bug, since the Javadocs explain the current behaviour correctly.

> isAllUpperCase should only check Alpha characters
> -------------------------------------------------
>
>                 Key: LANG-1043
>                 URL: https://issues.apache.org/jira/browse/LANG-1043
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: lang.*
>    Affects Versions: 3.3.2
>            Reporter: Frédéric JECKER
>
> Currently, isAllUpperCase checks character by character if the current character is UpperCase or not using Character.isUpperCase().
> The problem is that characters like spaces aren't considered as uppercase characters.
> IMHO, isAllUpperCase should only check the state of alpha characters so that :
> - StringUtils.isAllUpperCase("ABC DEF GHI") = true (false currently)
> - StringUtils.isAllUpperCase("ABC / DEF") = true (false currently)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)