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

creating a new vector causes NPE #7373

Closed
scabug opened this issue Apr 15, 2013 · 7 comments
Closed

creating a new vector causes NPE #7373

scabug opened this issue Apr 15, 2013 · 7 comments
Assignees
Milestone

Comments

@scabug
Copy link

@scabug scabug commented Apr 15, 2013

As simple as this:

scala> val a = new Vector(1,2,4)
java.lang.NullPointerException
at scala.collection.immutable.VectorIterator.next(Vector.scala:646)
at scala.collection.Iterator$$anon$10.next(Iterator.scala:347)
...

@scabug
Copy link
Author

@scabug scabug commented Apr 15, 2013

Imported From: https://issues.scala-lang.org/browse/SI-7373?orig=1
Reporter: @vigdorchik
Affected Versions: 2.11.0-M2

@scabug
Copy link
Author

@scabug scabug commented Apr 15, 2013

@retronym said:
That constructor should really be private. We would have to work within (or around) source compatibility constraints to make it so.

@scabug
Copy link
Author

@scabug scabug commented Apr 15, 2013

@paulp said:
I think the bug is that the constructor is not private. What exactly is a user going to pass for startIndex, endIndex, and focus?

@scabug
Copy link
Author

@scabug scabug commented Apr 15, 2013

@paulp said:
Jinx! 1-2-3-4-5-6-7-8-9-10

@scabug
Copy link
Author

@scabug scabug commented Apr 15, 2013

@vigdorchik said:
Ok, same thing happens with 2.10.1. Can we still tighten the visibility of the constructor for 2.11?

@scabug
Copy link
Author

@scabug scabug commented Apr 15, 2013

@vigdorchik said:
The question is if it ever works calling the constructor directly? If it doesn't, then we can assume it hasn't been called outside and the visibility can be reduced.

@scabug
Copy link
Author

@scabug scabug commented Dec 3, 2013

@scabug scabug closed this Dec 4, 2013
@scabug scabug added the critical label Apr 7, 2017
@scabug scabug added this to the 2.11.0-M8 milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants