Skip to content

Commit

Permalink
Ignore duplicated module-info.class in JAR root
Browse files Browse the repository at this point in the history
  • Loading branch information
mirfatif authored and Howard20181 committed Oct 19, 2024
1 parent 61bf75d commit 174eec3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ internal fun JarOutputStream.createFile(name: String, data: ByteArray) {
write(data)
closeEntry()
} catch (e: ZipException) {
// it's normal to have duplicated files in META-INF
if (!name.startsWith("META-INF")) throw e
// it's normal to have duplicated files in META-INF and duplicated module-info.class in root
if (!name.startsWith("META-INF") && name != "module-info.class") throw e
}
}

Expand Down

0 comments on commit 174eec3

Please sign in to comment.