[
https://issues.apache.org/jira/browse/LANG-883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14254737#comment-14254737
]
Bruno P. Kinoshita commented on LANG-883:
-----------------------------------------
I'm not committing the patch right now for I didn't participate in the issue
discussion, so I will give others who did time to review it first :-)
Patch looks good Daniel! Applied locally, build succeeded. Built site, tests
passed, coverage looks good, no checkstyle issues raised.
The Javadoc has a {{<p>}} that is not closed, which can be fixed after the
patch has been applied (unless you want to update your patch :^). And maybe add
two more test assertions.
{{assertFalse(StringUtils.containsAny("hello, goodbye", (String[]) null));}}
Which tests a missing branch condition in the first {{if}}, where {{cs}} is not
empty, but {{searchCharSequences}} is. And
{{assertTrue(StringUtils.containsAny("hello, goodbye", new String[] \{ "Hello",
"goodbye" \}));}}
Which also covers what is described in the issue description "which will return
true if any of the searchCharSequences are contained within the cs".
Thank you very much for your contribution Daniel! Your first patch is really
good!
> StringUtils.containsAny(CharSequence, CharSequence... )
> -------------------------------------------------------
>
> Key: LANG-883
> URL: https://issues.apache.org/jira/browse/LANG-883
> Project: Commons Lang
> Issue Type: New Feature
> Components: lang.*
> Affects Versions: 3.1
> Reporter: Ivan Hristov
> Priority: Trivial
> Fix For: Patch Needed
>
> Attachments: LANG-883.patch
>
>
> Presently there is a: public static boolean containsAny(CharSequence cs,
> char... searchChars). It would be useful to have the: public static boolean
> containsAny(CharSequence cs, CharSequence... searchCharSequences) which will
> return true if any of the searchCharSequences are contained within the cs. If
> you decide to implement it, it would be nice to have an alias method for
> collections, e.g., public static boolean containsAny(CharSequence cs,
> Collection<CharSequence> searchCharSequences)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)