Skip to content

Commit

Permalink
fix to use sets
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszwawrzyk committed Aug 13, 2018
1 parent 08278fd commit ff5240c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ abstract class ExistenceCheckBenchmark(jar: String) extends ZipOpsBench with Ben
}

override def run(ops: ZipOps): Unit = {
val allPaths = ops.readPaths(jarFile)
val allPaths = ops.readPaths(jarFile).toSet
paths.foreach(allPaths.contains)
}

Expand All @@ -62,7 +62,7 @@ abstract class ExistenceCheckBenchmark(jar: String) extends ZipOpsBench with Ben
val allPaths = {
import scala.collection.JavaConverters._
val zip = new ZipFile(jarFile)
val names = zip.entries().asScala.filterNot(_.isDirectory).map(_.getName)
val names = zip.entries().asScala.filterNot(_.isDirectory).map(_.getName).toSet
zip.close()
names
}
Expand Down

0 comments on commit ff5240c

Please sign in to comment.