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

Strings.isNullOrEmpty enhancement #652

Closed
gissuebot opened this issue Oct 31, 2014 · 2 comments
Closed

Strings.isNullOrEmpty enhancement #652

gissuebot opened this issue Oct 31, 2014 · 2 comments

Comments

@gissuebot
Copy link

Original issue created by elchin.asgarli on 2011-07-07 at 01:52 PM


Today I looked at the code of Strings.isNullOrEmpty and was really surprised to find out that it does not trim the string before checking its size/emptiness. Can this method be changed or some other method be added that would also call trim() on String before checking its size?

TIA

P.S. calling trim() on String before passing it to isNullOrEmpty won't work, since it can throw NPE if the passed String is null.

@gissuebot
Copy link
Author

Original comment posted by elchin.asgarli on 2011-07-07 at 01:57 PM


name suggestion: Strings.isNullOrBlank

@gissuebot
Copy link
Author

Original comment posted by kurt.kluever on 2011-07-07 at 02:46 PM


(No comment entered for this change.)


Status: Duplicate
Merged Into: #352

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