Skip to content

Commit 8a7da0d

Browse files
committed
Fixes scala/bug#11059. Replcaed UnsupportedOperationException with NoSuchElementException
1 parent 06ffeff commit 8a7da0d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/src/scala/collection/immutable/Vector.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ final class Vector[+A] private[immutable] (private[collection] val startIndex: I
144144
}
145145

146146
override def head: A = {
147-
if (isEmpty) throw new UnsupportedOperationException("empty.head")
147+
if (isEmpty) throw new NoSuchElementException("empty.head")
148148
apply(0)
149149
}
150150

0 commit comments

Comments
 (0)