Skip to content

Commit

Permalink
SI-7373 Make the constructor of Vector non-public
Browse files Browse the repository at this point in the history
The danger of:

   new Vector(1, 2, 3).toString
   java.lang.NullPointerException

and the "should have been private all along" argument
call for a break in the source compatibility policy here.
  • Loading branch information
retronym committed Dec 3, 2013
1 parent 6c63ab1 commit 1071d0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/library/scala/collection/immutable/Vector.scala
Expand Up @@ -59,7 +59,7 @@ object Vector extends IndexedSeqFactory[Vector] {
* @define mayNotTerminateInf * @define mayNotTerminateInf
* @define willNotTerminateInf * @define willNotTerminateInf
*/ */
final class Vector[+A](private[collection] val startIndex: Int, private[collection] val endIndex: Int, focus: Int) final class Vector[+A] private[immutable] (private[collection] val startIndex: Int, private[collection] val endIndex: Int, focus: Int)
extends AbstractSeq[A] extends AbstractSeq[A]
with IndexedSeq[A] with IndexedSeq[A]
with GenericTraversableTemplate[A, Vector] with GenericTraversableTemplate[A, Vector]
Expand Down

0 comments on commit 1071d0c

Please sign in to comment.