commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LANG-901) endsWithAny is case sensitive - documented as case insensitive
Date Fri, 21 Jun 2013 19:46:21 GMT

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

Sebb commented on LANG-901:
---------------------------

Not sure why two valid lower-case tests were dropped from the startsWithAny Javadoc; I think
they should be kept.

Also the Javadoc @return statements don't make sense (this is an old issue, but pasted into
the new methods):

{code}
* @return {@code true} if the CharSequence starts with any of the the prefixes, case insensitive,
or
*  both {@code null}
{code}

No idea what that means. "both" is normally used to refer to two items, but there may be more
(or fewer).
Do the routines never return "false" ? Given that they are "boolean", they cannot return "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
>            Assignee: Benedikt Ritter
>            Priority: Minor
>         Attachments: LANG-901-StringUtils-StartsWithAnyEndsWithAny.patch
>
>
> endsWithAny was added in response to this task: https://issues.apache.org/jira/browse/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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message