Hi Tobias,

Regardless of whether this is a bug or not, JarIndex has been disabled
by default in JDK 18, in the hope to eventually remove it in the
future.

See https://bugs.openjdk.java.net/browse/JDK-8273473

best regards,

-- daniel

On 27/01/2022 18:41, Tobias Stadler wrote:
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


Reply via email to