@@ -11,7 +11,7 @@ import java.nio.file.Files
1111import java .util .zip .{ ZipEntry , ZipFile }
1212import java .util .jar .Manifest
1313import scala .collection .mutable
14- import scala .collection . JavaConverters ._
14+ import scala .jdk . CollectionConverters ._
1515
1616/** An abstraction for zip files and streams. Everything is written the way
1717 * it is for performance: we come through here a lot on every run. Be careful
@@ -85,7 +85,7 @@ abstract class ZipArchive(override val jpath: JPath) extends AbstractFile with E
8585 }
8686 }
8787
88- private def ensureDir (dirs : mutable.Map [String , DirEntry ], path : String , zipEntry : ZipEntry ): DirEntry =
88+ private def ensureDir (dirs : mutable.Map [String , DirEntry ], path : String ): DirEntry =
8989 // OPT inlined from getOrElseUpdate; saves ~50K closures on test run.
9090 // was:
9191 // dirs.getOrElseUpdate(path, {
@@ -97,16 +97,16 @@ abstract class ZipArchive(override val jpath: JPath) extends AbstractFile with E
9797 dirs get path match {
9898 case Some (v) => v
9999 case None =>
100- val parent = ensureDir(dirs, dirName(path), null )
100+ val parent = ensureDir(dirs, dirName(path))
101101 val dir = new DirEntry (path, parent)
102102 parent.entries(baseName(path)) = dir
103103 dirs(path) = dir
104104 dir
105105 }
106106
107107 protected def getDir (dirs : mutable.Map [String , DirEntry ], entry : ZipEntry ): DirEntry = {
108- if (entry.isDirectory) ensureDir(dirs, entry.getName, entry )
109- else ensureDir(dirs, dirName(entry.getName), null )
108+ if (entry.isDirectory) ensureDir(dirs, entry.getName)
109+ else ensureDir(dirs, dirName(entry.getName))
110110 }
111111}
112112/** ''Note: This library is considered experimental and should not be used unless you know what you are doing.'' */
@@ -240,8 +240,8 @@ final class ManifestResources(val url: URL) extends ZipArchive(null) {
240240 private def resourceInputStream (path : String ): InputStream = {
241241 new FilterInputStream (null ) {
242242 override def read (): Int = {
243- if (in == null ) in = Thread .currentThread().getContextClassLoader().getResourceAsStream(path)
244- if (in == null ) throw new RuntimeException (path + " not found" )
243+ if (in == null ) in = Thread .currentThread().getContextClassLoader().getResourceAsStream(path)
244+ if (in == null ) throw new RuntimeException (path + " not found" )
245245 super .read()
246246 }
247247
0 commit comments