Skip to content
This repository was archived by the owner on Sep 8, 2022. It is now read-only.

Commit 1ced308

Browse files
committed
be compatible with more Scala versions
see scala/scala#4640 for details. in that PR (targeted for 2.12.0-M3), we are making a binary incompatible change to Stream. by avoiding using Stream at all here, we avoid running afoul of the incompatibility. Stream is arguably overkill here anyway, Iterator is just fine. so there's no need to change the code back after we're over the M2/M3 incompatibility hump.
1 parent 2f9f2f9 commit 1ced308

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/scala/scala/tools/partest/nest/PathSettings.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ object PathSettings {
2828
private def cwd = Directory.Current getOrElse sys.error("user.dir property not set")
2929
private def isPartestDir(d: Directory) = (d.name == "test") && (d / testSourcePath isDirectory)
3030
private def findJar(name: String, ds: Directory*): Either[String, File] =
31-
ds.toStream flatMap (_.files) filter (_ hasExtension "jar") find ( _.name startsWith name ) map (Right(_)) getOrElse
31+
ds.iterator flatMap (_.files) filter (_ hasExtension "jar") find ( _.name startsWith name ) map (Right(_)) getOrElse
3232
Left(s"'${name}.jar' not found in '${ds map (_.path) mkString ", "}'.")
3333

3434
// Directory <root>/test

0 commit comments

Comments
 (0)