File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -201,6 +201,7 @@ final class FileZipArchive(jpath: JPath) extends ZipArchive(jpath) {
201
201
private [this ] var closeables : List [java.io.Closeable ] = Nil
202
202
override def close (): Unit = {
203
203
closeables.foreach(_.close)
204
+ closeables = Nil
204
205
}
205
206
}
206
207
@@ -266,5 +267,6 @@ final class ManifestResources(val url: URL) extends ZipArchive(null) {
266
267
private [this ] var closeables : List [java.io.Closeable ] = Nil
267
268
override def close (): Unit = {
268
269
closeables.foreach(_.close())
270
+ closeables = Nil
269
271
}
270
272
}
Original file line number Diff line number Diff line change @@ -83,8 +83,8 @@ class ZipArchiveTest {
83
83
finally {
84
84
archive.close()
85
85
// The following results in IOException on Windows (file in use by another process).
86
- // As jar is a temp file , it will be deleted automatically.
87
- // Files.delete(jar)
86
+ // As jar created with Files.createTempFile , it will be deleted automatically.
87
+ try Files .delete(jar) catch case _ : IOException => ( )
88
88
}
89
89
}
90
90
You can’t perform that action at this time.
0 commit comments