diff options
author | Seth Tisue <seth@tisue.net> | 2015-09-21 08:14:55 -0400 |
---|---|---|
committer | Seth Tisue <seth@tisue.net> | 2015-09-21 08:14:55 -0400 |
commit | 1986ed28b64d3d707335050022aa972c95c3a7f7 (patch) | |
tree | 0c9b66a19d28f8808eae0161e8091f158a42f2cb /src | |
parent | b626af6b7f497787167847c26b8269aeb012442c (diff) | |
parent | 8cca2bcae8d1393cb7de8f777ace6a918acabb28 (diff) | |
download | scala-1986ed28b64d3d707335050022aa972c95c3a7f7.tar.gz scala-1986ed28b64d3d707335050022aa972c95c3a7f7.tar.bz2 scala-1986ed28b64d3d707335050022aa972c95c3a7f7.zip |
Merge pull request #4758 from lrytz/pagedSeqNpe
Fix NPE in PagedSeq.slice at end of seq
Diffstat (limited to 'src')
-rw-r--r-- | src/library/scala/collection/immutable/PagedSeq.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/library/scala/collection/immutable/PagedSeq.scala b/src/library/scala/collection/immutable/PagedSeq.scala index f11217d26a..a86d4b6746 100644 --- a/src/library/scala/collection/immutable/PagedSeq.scala +++ b/src/library/scala/collection/immutable/PagedSeq.scala @@ -190,8 +190,8 @@ extends scala.collection.AbstractSeq[T] val e = if (_end == UndeterminedEnd) _end else start + _end var f = first1 while (f.end <= s && !f.isLast) { - if (f.next eq null) f.addMore(more) - f = f.next + if (f.next eq null) f = f.addMore(more) + else f = f.next } // Warning -- not refining `more` means that slices can freely request and obtain // data outside of their slice. This is part of the design of PagedSeq |