Skip to content

Commit e9e417c

Browse files
authored
Merge pull request scala/scala#7023 from veera83372/issue/11059
Fixes scala/bug#11059. Replcaed UnsupportedOperationException with NoSuchElementException
2 parents 25c0e8f + 8a7da0d commit e9e417c

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)