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

Utils.isNumeric returns true for empty string #3551

Closed
michbarsinai opened this issue Dec 25, 2016 · 4 comments
Closed

Utils.isNumeric returns true for empty string #3551

michbarsinai opened this issue Dec 25, 2016 · 4 comments

Comments

@michbarsinai
Copy link
Member

michbarsinai commented Dec 25, 2016

Should be false.

It's a quick fix, but since this method is used a lot, fixing this would require some app-wide testing. So opening a new bug.

@pdurbin pdurbin added Component: Code Infrastructure formerly "Feature: Code Infrastructure" and removed Effort 1: Small labels Jun 8, 2017
@pdurbin
Copy link
Member

pdurbin commented Jun 28, 2017

@michbarsinai please see my comments at #3903. Again, first we set expectations in the dev guide. Then we point to the expectation. Then we fix the code. Or just walk down the hall and have a conversation with the person if you can! 😄

@pdurbin
Copy link
Member

pdurbin commented Jun 29, 2017

Closing to consolidate into #3950.

@pdurbin pdurbin closed this as completed Jun 29, 2017
@oscardssmith
Copy link
Contributor

In my mind, the better question is why does this function exist? It seems like a worse version of org.apache.commons.lang.StringUtils, and is only used by AbstractApiBean, which has the following method protected boolean isNumeric( String str ) { return Util.isNumeric(str); }. This function is minimally tested, and only used in 5 places other than tests. I'm making a pull request now to remove the function and replace it's usages with the apache version.

@sekmiller
Copy link
Contributor

Ready for QA.

@sekmiller sekmiller removed their assignment Jun 29, 2017
@kcondon kcondon self-assigned this Jul 10, 2017
@kcondon kcondon closed this as completed Jul 10, 2017
@pdurbin pdurbin added this to the 4.7.1 - Dashboard milestone Sep 26, 2017
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

5 participants