@@ -11,7 +11,7 @@ import java.nio.file.Files
11
11
import java .util .zip .{ ZipEntry , ZipFile }
12
12
import java .util .jar .Manifest
13
13
import scala .collection .mutable
14
- import scala .collection . JavaConverters ._
14
+ import scala .jdk . CollectionConverters ._
15
15
16
16
/** An abstraction for zip files and streams. Everything is written the way
17
17
* 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
85
85
}
86
86
}
87
87
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 =
89
89
// OPT inlined from getOrElseUpdate; saves ~50K closures on test run.
90
90
// was:
91
91
// dirs.getOrElseUpdate(path, {
@@ -97,16 +97,16 @@ abstract class ZipArchive(override val jpath: JPath) extends AbstractFile with E
97
97
dirs get path match {
98
98
case Some (v) => v
99
99
case None =>
100
- val parent = ensureDir(dirs, dirName(path), null )
100
+ val parent = ensureDir(dirs, dirName(path))
101
101
val dir = new DirEntry (path, parent)
102
102
parent.entries(baseName(path)) = dir
103
103
dirs(path) = dir
104
104
dir
105
105
}
106
106
107
107
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))
110
110
}
111
111
}
112
112
/** ''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) {
240
240
private def resourceInputStream (path : String ): InputStream = {
241
241
new FilterInputStream (null ) {
242
242
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" )
245
245
super .read()
246
246
}
247
247
0 commit comments