JarIndex not following the specification
Tobias Stadler
ts.stadler at gmx.de
Thu Jan 27 18:41:42 UTC 2022
Hello everyone,
According to https://docs.oracle.com/en/java/javase/17/docs/specs/jar/jar.html, sections in META-INF/INDEX.LIST are divided by blank lines.
The write method of jdk.internal.util.jar.JarIndex does write those blank lines. But the read method begins a new section whenever it sees a line that ends with .jar. Does anybody know why JarIndex#read does not follow the specification? Is this a bug?
E.g.
some.jar
META-INF
META-INF/another.jar
org
Will be be read as two sections instead of just one. Also the package org will be mapped to META-INF/another.jar instead of some.jar.
Best reagrds
Tobias
More information about the core-libs-dev
mailing list