From 6866d592b9355551b2d3d337081fd1a849f852d1 Mon Sep 17 00:00:00 2001 From: Geoffrey Washburn Date: Thu, 13 Nov 2008 23:05:51 +0000 Subject: Applied Paul's patch for #1380, moved test out ... Applied Paul's patch for #1380, moved test out of pending. --- src/compiler/scala/tools/nsc/io/ZipArchive.scala | 5 +++-- test/files/pos/t1380.flags | 1 + test/files/pos/t1380/gnujaxp.jar.desired.sha1 | 1 + test/files/pos/t1380/hallo.scala | 3 +++ test/pending/pos/t1380.flags | 1 - test/pending/pos/t1380/gnujaxp.jar.desired.sha1 | 1 - test/pending/pos/t1380/hallo.scala | 3 --- 7 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 test/files/pos/t1380.flags create mode 100644 test/files/pos/t1380/gnujaxp.jar.desired.sha1 create mode 100644 test/files/pos/t1380/hallo.scala delete mode 100644 test/pending/pos/t1380.flags delete mode 100644 test/pending/pos/t1380/gnujaxp.jar.desired.sha1 delete mode 100644 test/pending/pos/t1380/hallo.scala diff --git a/src/compiler/scala/tools/nsc/io/ZipArchive.scala b/src/compiler/scala/tools/nsc/io/ZipArchive.scala index dacfc0dd79..aa10febce5 100644 --- a/src/compiler/scala/tools/nsc/io/ZipArchive.scala +++ b/src/compiler/scala/tools/nsc/io/ZipArchive.scala @@ -118,8 +118,9 @@ final class ZipArchive(file: File, val archive: ZipFile) extends PlainFile(file) this.toString() + " - " + path); if (entry.isDirectory()) { val dir: DirEntry = getDir(dirs, path) - assert(dir.entry eq null, this.toString() + " - " + path) - dir.entry = entry + // this assertion causes an unnecessary bomb if a directory is twice listed in the jar + // assert(dir.entry eq null, this.toString() + " - " + path) + if (dir.entry eq null) dir.entry = entry } else { val index = path.lastIndexOf('/') val name = if (index < 0) path else path.substring(index + 1) diff --git a/test/files/pos/t1380.flags b/test/files/pos/t1380.flags new file mode 100644 index 0000000000..f0b0ef7f51 --- /dev/null +++ b/test/files/pos/t1380.flags @@ -0,0 +1 @@ +-cp pending/pos/t1380/gnujaxp.jar diff --git a/test/files/pos/t1380/gnujaxp.jar.desired.sha1 b/test/files/pos/t1380/gnujaxp.jar.desired.sha1 new file mode 100644 index 0000000000..c155c2aaa2 --- /dev/null +++ b/test/files/pos/t1380/gnujaxp.jar.desired.sha1 @@ -0,0 +1 @@ +ee000286d00c5209d5644462c1cfea87fc8b1342 ?gnujaxp.jar diff --git a/test/files/pos/t1380/hallo.scala b/test/files/pos/t1380/hallo.scala new file mode 100644 index 0000000000..27ecd9fb8b --- /dev/null +++ b/test/files/pos/t1380/hallo.scala @@ -0,0 +1,3 @@ +object hallo { + def main(args:Array[String]) = println("hallo") +} diff --git a/test/pending/pos/t1380.flags b/test/pending/pos/t1380.flags deleted file mode 100644 index be71b662b7..0000000000 --- a/test/pending/pos/t1380.flags +++ /dev/null @@ -1 +0,0 @@ --Ydebug -cp pending/pos/t1380/gnujaxp.jar diff --git a/test/pending/pos/t1380/gnujaxp.jar.desired.sha1 b/test/pending/pos/t1380/gnujaxp.jar.desired.sha1 deleted file mode 100644 index c155c2aaa2..0000000000 --- a/test/pending/pos/t1380/gnujaxp.jar.desired.sha1 +++ /dev/null @@ -1 +0,0 @@ -ee000286d00c5209d5644462c1cfea87fc8b1342 ?gnujaxp.jar diff --git a/test/pending/pos/t1380/hallo.scala b/test/pending/pos/t1380/hallo.scala deleted file mode 100644 index 27ecd9fb8b..0000000000 --- a/test/pending/pos/t1380/hallo.scala +++ /dev/null @@ -1,3 +0,0 @@ -object hallo { - def main(args:Array[String]) = println("hallo") -} -- cgit v1.2.3