Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8134779

jmod: ZipException is thrown if there are duplicate resources

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9-repo-jigsaw
    • Fix Version/s: 9
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b130
    • Verification:
      Verified

      Description

      jmod: ZipException is thrown if there are duplicate resources

      To reproduce:
      1. create two resources (classes) in different directories
      2. run jmod create --class-path dir1:dir2 module.jmod

      java.util.zip.ZipException: duplicate entry: classes/javax/B.class
              at java.util.zip.ZipOutputStream.putNextEntry(java.base@9.0/ZipOutputStream.java:232)
              at jdk.tools.jmod.JmodTask$JmodFileWriter.writeZipEntry(jdk.jlink@9.0/JmodTask.java:545)
              at jdk.tools.jmod.JmodTask$JmodFileWriter$1.visitFile(jdk.jlink@9.0/JmodTask.java:531)
              at jdk.tools.jmod.JmodTask$JmodFileWriter$1.visitFile(jdk.jlink@9.0/JmodTask.java:522)
              at java.nio.file.Files.walkFileTree(java.base@9.0/Files.java:2676)
              at java.nio.file.Files.walkFileTree(java.base@9.0/Files.java:2748)
              at jdk.tools.jmod.JmodTask$JmodFileWriter.processSection(jdk.jlink@9.0/JmodTask.java:522)
              at jdk.tools.jmod.JmodTask$JmodFileWriter.processClasses(jdk.jlink@9.0/JmodTask.java:499)
              at jdk.tools.jmod.JmodTask$JmodFileWriter.write(jdk.jlink@9.0/JmodTask.java:290)
              at jdk.tools.jmod.JmodTask.create(jdk.jlink@9.0/JmodTask.java:262)
              at jdk.tools.jmod.JmodTask.run(jdk.jlink@9.0/JmodTask.java:182)
              at jdk.tools.jmod.Main.run(jdk.jlink@9.0/Main.java:47)

        Attachments

          Activity

            People

            • Assignee:
              chegar Chris Hegarty
              Reporter:
              aeremeev Andrei Eremeev
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: