commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amey Jadiye (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TEXT-88) WordUtils.capitalizeFully behaves in a counterintuitive manner with empty delimiter array.
Date Thu, 15 Jun 2017 17:48:00 GMT

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

Amey Jadiye commented on TEXT-88:
---------------------------------

Hmm, we can arrange code so behaviour will desired for those 2-3 methods but throwing Exceptions
is not good idea IMHO, exceptions should be handled in utility methods.

Also if we go with your logic the below methods should be changed  and throw NPE? I think
they are doing well in {{StringUtils}}.

{code}
StringUtils.equals("abc", null)  = false
StringUtils.isEmpty(null)      = true
StringUtils.isBlank(null)      = true
StringUtils.isNotBlank(null)      = false
StringUtils.isAnyBlank(null, "foo")      = true
StringUtils.isNoneBlank(null, "foo")      = false
StringUtils.isNoneBlank(null, null)       = false
StringUtils.strip(null, *)          = null
.
.
.
// many more
{code}

> WordUtils.capitalizeFully behaves in a counterintuitive manner with empty delimiter array.
> ------------------------------------------------------------------------------------------
>
>                 Key: TEXT-88
>                 URL: https://issues.apache.org/jira/browse/TEXT-88
>             Project: Commons Text
>          Issue Type: Bug
>            Reporter: Rob Tompkins
>
> As discussed in TEXT-85, it seems that 
> {code:java}
> WordUtils.capitalizeFully("i am fine", new char[]{}) // --> i am fine
> {code}
> Both Sebb and Arun think that this is odd and that the letter "i" should have been capitalized
resulting in the output {{I am fine}}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message