[
https://issues.apache.org/jira/browse/LANG-901?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14986503#comment-14986503
]
Matthew Bartenschlag commented on LANG-901:
-------------------------------------------
Team, sorry to resurrect this ticket, but I think it's worth revisiting since
the documentation is still not in sync with the code. Specifically, there are a
few inconsistencies in the documentation that I feel are worthy of being
corrected independent of the null-handling behaviors.
Specifically, there's any example in startsWithAny that is incorrect, and in
both startsWithAny and endsWithAny the documentation still indicates the
comparisons are case insensitive.
{code:title=StringUtils.java|borderStyle=solid}
StringUtils.startsWithAny("abcxyz", new String[] {""}) = false
{code}
I'm creating and attaching for your review another patch which hopefully
improves the documentation and introduces more test cases that verify the
documented behaviors.
> 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.3.4#6332)