Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hint for converting to StringUtils.isBlank()/StringUtils.isNotBlank()/StringUtils.isEmpty() - Commons Lang #12

Closed
markiewb opened this issue Oct 3, 2013 · 1 comment
Milestone

Comments

@markiewb
Copy link
Owner

markiewb commented Oct 3, 2013

<!description="Convert to StringUtils.isBlank()">
$v == null || $v.trim().length() == 0
=> org.apache.commons.lang.StringUtils.isBlank($v)
;;
$v == null || $v.trim().isEmpty()
=> org.apache.commons.lang.StringUtils.isBlank($v)
;;
$v != null && $v.trim().length() == 0
=> org.apache.commons.lang.StringUtils.isBlank($v)
;;
$v != null && $v.trim().isEmpty()
=> org.apache.commons.lang.StringUtils.isBlank($v)
;;

<!description="Convert to StringUtils.isNotBlank()">
$v != null && $v.trim().length() > 0
=> org.apache.commons.lang.StringUtils.isNotBlank($v)
;;
$v != null && !$v.trim().isEmpty()
=> org.apache.commons.lang.StringUtils.isNotBlank($v)
;;

<!description="Convert to StringUtils.isEmpty()">
$v == null || $v.length() == 0
=> org.apache.commons.lang.StringUtils.isEmpty($v)
;;
$v == null || $v.isEmpty()
=> org.apache.commons.lang.StringUtils.isEmpty($v)
;;
$v != null && $v.isEmpty()
=> org.apache.commons.lang.StringUtils.isEmpty($v)
;;
$v != null && $v.length() == 0
=> org.apache.commons.lang.StringUtils.isEmpty($v)
;;
@markiewb markiewb modified the milestones: 1.2, Later Apr 23, 2014
@markiewb markiewb changed the title Hint for converting to StringUtils.isBlank()/StringUtils.isNotBlank()/StringUtils.isEmpty() Hint for converting to StringUtils.isBlank()/StringUtils.isNotBlank()/StringUtils.isEmpty() - Commons Lang Apr 23, 2014
markiewb added a commit that referenced this issue May 12, 2014
markiewb added a commit that referenced this issue May 12, 2014
* feature/issue-12-StringUtils:
  issue #12: Hint for converting to StringUtils.isBlank()/StringUtils.isNotBlank()/StringUtils.isEmpty()
@markiewb
Copy link
Owner Author

fixed in 1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant