diff options
author | Paul Phillips <paulp@improving.org> | 2011-08-15 17:36:05 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-08-15 17:36:05 +0000 |
commit | 267277e5b41412b67f1dce10d59532aef51d6a3d (patch) | |
tree | 283644280324cecf49ea3f735a23a4ff23bac251 | |
parent | e121da6c013efbeab79c2e6b9d1403e127b7ae88 (diff) | |
download | scala-267277e5b41412b67f1dce10d59532aef51d6a3d.tar.gz scala-267277e5b41412b67f1dce10d59532aef51d6a3d.tar.bz2 scala-267277e5b41412b67f1dce10d59532aef51d6a3d.zip |
Eliminated binary compat problem with getLines ...
Eliminated binary compat problem with getLines patch.
-rw-r--r-- | src/library/scala/io/BufferedSource.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/library/scala/io/BufferedSource.scala b/src/library/scala/io/BufferedSource.scala index b5144a891f..845a816421 100644 --- a/src/library/scala/io/BufferedSource.scala +++ b/src/library/scala/io/BufferedSource.scala @@ -48,7 +48,7 @@ class BufferedSource(inputStream: InputStream, bufferSize: Int)(implicit val cod // that calls hasNext to find out if they're empty, and that leads // to chars being buffered, and no, I don't work here, they left a // door unlocked. - private val lineReader: BufferedReader = { + val bufReader: BufferedReader = { // To avoid inflicting this silliness indiscriminately, we can // skip it if the char reader was never created: and almost always // it will not have been created, since getLines will be called @@ -64,13 +64,13 @@ class BufferedSource(inputStream: InputStream, bufferSize: Int)(implicit val cod override def hasNext = { if (nextLine == null) - nextLine = lineReader.readLine + nextLine = bufReader.readLine nextLine != null } override def next(): String = { val result = { - if (nextLine == null) lineReader.readLine + if (nextLine == null) bufReader.readLine else try nextLine finally nextLine = null } if (result == null) Iterator.empty.next |