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

StringLike.parseBoolean throws a NumberFormatException if the parsed String is malformed #5032

Closed
scabug opened this Issue Sep 27, 2011 · 2 comments

Comments

Projects
None yet
2 participants
@scabug
Copy link

scabug commented Sep 27, 2011

StringLike.parseBoolean (and hence StringOps.toBoolean) throws a NumberFormatException if the String is not a valid boolean. This makes no sense - should probably be an IllegalArgumentException instead

@scabug

This comment has been minimized.

Copy link

scabug commented Sep 27, 2011

Imported From: https://issues.scala-lang.org/browse/SI-5032?orig=1
Reporter: @oxbowlakes
Affected Versions: 2.9.1

@scabug

This comment has been minimized.

Copy link

scabug commented Oct 11, 2011

Commit Message Bot (anonymous) said:
(extempore in r25822) Throw different exception.

Booleans aren't numbers. Closes #5032, no review.

@scabug scabug closed this Oct 11, 2011

@scabug scabug added the quickfix label Apr 7, 2017

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