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?
to your account
copying zero bytes did not throw an exception in 2.10.0, so it should not start doing so now (discovered when running the Akka test suite on 2.10.1-RC1)
The text was updated successfully, but these errors were encountered:
Imported From: https://issues.scala-lang.org/browse/SI-7128?orig=1
Affected Versions: 2.10.1-RC1, 2.10.1
Sorry, something went wrong.
this issue was introduced by fixing the above ticket
scala> "...".toIterator.copyToArray(new Array[Char](0), 0, 0)
java.lang.IllegalArgumentException: requirement failed: start 0 out of range 0
Björn Antonsson (bjorn.antonsson) said (edited on Mar 14, 2013 1:34:36 PM UTC):
This did not throw an exception on 2.10.0. We are still copying 0 bytes.
scala> "...".toIterator.copyToArray(new Array[Char](1), 1, 0)
java.lang.IllegalArgumentException: requirement failed: start 1 out of range 1
2.10.2 is about to be cut. Kicking down the road and un-assigning to foster work stealing.
There are various issues with copyToArray on Array and Iterator (and by extension TraversableOnce)--this came up again in my testing and should be fixed.
Updating fix-by version to 2.11.5.
Successfully merging a pull request may close this issue.