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

Document IllegalStateExceptions thrown by uninitialized MatchIterator from Regex #8215

Closed
scabug opened this issue Jan 30, 2014 · 5 comments
Closed

Comments

@scabug
Copy link

scabug commented Jan 30, 2014

The MatchIterator returned by scala.util.matching.Regex.findAllIn is backed by a java.util.regex.Matcher, which throws IllegalStateExceptions if called before it had been initialized.

This behaviour is not documented in the Scaladoc, leading to a confusing user experience:

val msg = "I love Scala"
val start = " ".r.findAllIn(msg).start // throws an IllegalStateException

See discussion here: https://groups.google.com/forum/#!topic/scala-language/2T2wKVQiyVg

@scabug
Copy link
Author

scabug commented Jan 30, 2014

Imported From: https://issues.scala-lang.org/browse/SI-8215?orig=1
Reporter: @demobox
Affected Versions: 2.11.0-M8

@scabug
Copy link
Author

scabug commented Jan 31, 2014

@demobox said:
PR: scala/scala#3439

@scabug
Copy link
Author

scabug commented Feb 1, 2014

@demobox said:
FYI: Individual CLA signed and submitted.

@scabug scabug closed this as completed Feb 3, 2014
@scabug
Copy link
Author

scabug commented Feb 5, 2014

@demobox said:
Follow-up PR to fix a stupid typo and simplify a sentence:

scala/scala#3470

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

2 participants