You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Alexander Muthmann (JIRA)" <ji...@apache.org> on 2012/10/31 15:17:14 UTC
[jira] [Created] (LANG-848) Improve StringUtils.is(Not)Blank with a
CharSequence... version
Alexander Muthmann created LANG-848:
---------------------------------------
Summary: Improve StringUtils.is(Not)Blank with a CharSequence... version
Key: LANG-848
URL: https://issues.apache.org/jira/browse/LANG-848
Project: Commons Lang
Issue Type: Improvement
Components: lang.*
Affects Versions: 3.1
Reporter: Alexander Muthmann
Currently it's only possible to compare a single CharSequence per is(Not)Blank/is(Not)Empty call.
This should be changed to support multiple CharSequences in a single call.
{code}
if(StringUtils.isNotBlank(foo) && StringUtils.isNotBlank(bar) && ...)
{code}
could be changed to
{code}
if(StringUtils.isNotBlank(foo, bar, ...)
{code}
As there are two possible ways to combine the results (AND and OR), it'd be necessary to create multiple methods.
{code}
isAnyBlank(CharSequence... cs)
isNoneBlank(CharSequence... cs)
isAnyEmpty(CharSequence... cs)
isNoneEmpty(CharSequence... cs)
{code}
I could implement those methods and contribute them via github if there is any interest from project's side.
--
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
[jira] [Commented] (LANG-848) Improve StringUtils.is(Not)Blank with
a CharSequence... version
Posted by "Alexander Muthmann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LANG-848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13487874#comment-13487874 ]
Alexander Muthmann commented on LANG-848:
-----------------------------------------
I created a pull request in github for this feature:
https://github.com/apache/commons-lang/pull/3
> Improve StringUtils.is(Not)Blank with a CharSequence... version
> ---------------------------------------------------------------
>
> Key: LANG-848
> URL: https://issues.apache.org/jira/browse/LANG-848
> Project: Commons Lang
> Issue Type: Improvement
> Components: lang.*
> Affects Versions: 3.1
> Reporter: Alexander Muthmann
>
> Currently it's only possible to compare a single CharSequence per is(Not)Blank/is(Not)Empty call.
> This should be changed to support multiple CharSequences in a single call.
> {code}
> if(StringUtils.isNotBlank(foo) && StringUtils.isNotBlank(bar) && ...)
> {code}
> could be changed to
> {code}
> if(StringUtils.isNotBlank(foo, bar, ...)
> {code}
> As there are two possible ways to combine the results (AND and OR), it'd be necessary to create multiple methods.
> {code}
> isAnyBlank(CharSequence... cs)
> isNoneBlank(CharSequence... cs)
> isAnyEmpty(CharSequence... cs)
> isNoneEmpty(CharSequence... cs)
> {code}
> I could implement those methods and contribute them via github if there is any interest from project's side.
--
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
[jira] [Updated] (LANG-848) Improve StringUtils.is(Not)Blank with a
CharSequence... version
Posted by "Alexander Muthmann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LANG-848?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexander Muthmann updated LANG-848:
------------------------------------
Fix Version/s: 3.x
> Improve StringUtils.is(Not)Blank with a CharSequence... version
> ---------------------------------------------------------------
>
> Key: LANG-848
> URL: https://issues.apache.org/jira/browse/LANG-848
> Project: Commons Lang
> Issue Type: Improvement
> Components: lang.*
> Affects Versions: 3.1
> Reporter: Alexander Muthmann
> Fix For: 3.x
>
>
> Currently it's only possible to compare a single CharSequence per is(Not)Blank/is(Not)Empty call.
> This should be changed to support multiple CharSequences in a single call.
> {code}
> if(StringUtils.isNotBlank(foo) && StringUtils.isNotBlank(bar) && ...)
> {code}
> could be changed to
> {code}
> if(StringUtils.isNotBlank(foo, bar, ...)
> {code}
> As there are two possible ways to combine the results (AND and OR), it'd be necessary to create multiple methods.
> {code}
> isAnyBlank(CharSequence... cs)
> isNoneBlank(CharSequence... cs)
> isAnyEmpty(CharSequence... cs)
> isNoneEmpty(CharSequence... cs)
> {code}
> I could implement those methods and contribute them via github if there is any interest from project's side.
--
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