Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
These two helper methods are in some other open source libraries but we don't always include those. It bugged me enough that I added them here. Signed-off-by: Aaron Rosenzweig <[email protected]>
- Loading branch information
3f67d56
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you use ERXValueUtilities.isNull? I use that method rather a lot.
3f67d56
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Ray, I have not used ERXValueUtilities.isNull but thanks for pointing it out. It's interesting that the class comments say it treats whitespace as null but the "isNull()" method does not. I like the "trim()" concept and not letting people type a few spaces to "validate" a field.
3f67d56
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apache Commons Lang, which is included in ERJars has methods like these and many more. See StringUtils class. Probably all these Wonder ones should be deprecated in favor of the very well implemented and documented Apache Commons Lang utilities.
Apache Commons Lang StringUtils API
3f67d56
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're completely right. I thought about some times ago and I forgot. Clever.