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

Benedikt Ritter edited comment on LANG-901 at 10/25/13 12:25 PM:
-----------------------------------------------------------------

I've reviewed the patch. I agree with sebb, the doc can be tweaked, but that's 
no problem. What need's to be discussed is the behavior for null inputs:

{code}
StringUtils.startsWith(null, null) = true
StringUtils.startsWithAny(null, null) = false
{code}

(this also applies for the other methods). I think they should behave the same 
for null inputs. The question how the following should behave:

{code}
StringUtils.startsWithAny(null, new String[]{ null })
{code}


was (Author: britter):
I've reviewed the patch. I agree with sebb, the doc can be tweaked, but that's 
no problem. What need's to be discussed is the behavior for null inputs:

{code}
StringUtils.startsWith(null, null) = true
StringUtils.startsWithAny(null, null) = false
{code}

(this also applies for the other methods). I think they should behave the same 
for null inputs. The question how the following should behave:

{code}
StringUtils.startsWithAny(null, new String[]{ null })

> endsWithAny is case sensitive - documented as case insensitive
> --------------------------------------------------------------
>
>                 Key: LANG-901
>                 URL: https://issues.apache.org/jira/browse/LANG-901
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 3.1
>            Reporter: Matthew Bartenschlag
>            Priority: Minor
>             Fix For: Review Patch, Discussion
>
>         Attachments: LANG-901-StringUtils-StartsWithAnyEndsWithAny.patch
>
>
> endsWithAny was added in response to this task: LANG-614
> Documentation says that the method returns "true if the CharSequence starts 
> with any of the the prefixes, case insensitive, or both null" 
> StringUtils.endsWithAny("MIME/TYPE", "TYPE") true
> StringUtils.endsWithAny("MIME/TYPE", "type") false



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to