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

copyToArray(xs, 0, 0) should not fail #7128

Closed
scabug opened this issue Feb 14, 2013 · 10 comments
Closed

copyToArray(xs, 0, 0) should not fail #7128

scabug opened this issue Feb 14, 2013 · 10 comments
Assignees
Milestone

Comments

@scabug
Copy link

scabug commented Feb 14, 2013

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)

@scabug
Copy link
Author

scabug commented Feb 14, 2013

Imported From: https://issues.scala-lang.org/browse/SI-7128?orig=1
Reporter: @rkuhn
Affected Versions: 2.10.1-RC1, 2.10.1
See #6827

@scabug
Copy link
Author

scabug commented Feb 14, 2013

@rkuhn said:
this issue was introduced by fixing the above ticket

@scabug
Copy link
Author

scabug commented Feb 14, 2013

@retronym said:

scala> "...".toIterator.copyToArray(new Array[Char](0), 0, 0)
java.lang.IllegalArgumentException: requirement failed: start 0 out of range 0
	at scala.Predef$.require(Predef.scala:233)

@scabug
Copy link
Author

scabug commented Feb 14, 2013

@retronym said:
scala/scala#2128

@scabug
Copy link
Author

scabug commented Mar 14, 2013

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

@scabug
Copy link
Author

scabug commented May 20, 2013

@JamesIry said:
2.10.2 is about to be cut. Kicking down the road and un-assigning to foster work stealing.

1 similar comment
@scabug
Copy link
Author

scabug commented May 20, 2013

@JamesIry said:
2.10.2 is about to be cut. Kicking down the road and un-assigning to foster work stealing.

@scabug
Copy link
Author

scabug commented Aug 22, 2014

@Ichoran said:
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.

@scabug
Copy link
Author

scabug commented Aug 24, 2014

@Ichoran said:
scala/scala#3940

@scabug
Copy link
Author

scabug commented Nov 4, 2014

@retronym said:
Updating fix-by version to 2.11.5.

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