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

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

Closed
scabug opened this issue Sep 27, 2011 · 2 comments
Assignees

Comments

@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
Copy link
Author

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
Copy link
Author

scabug commented Oct 11, 2011

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

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

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

No branches or pull requests

2 participants