Hi,

Please review my change for 8216401[1].

Webrev:
http://cr.openjdk.java.net/~bchristi/8216401/webrev-01/

The Class-Path section of the JAR spec[2] states that entries must be relative URLs, however this hasn't been enforced for most of Java's history. There is now code to enforce this, though it is disabled by default for compatibility.

It has come to light that there are some widely-used libraries that misuse the Class-Path attribute, by including absolute "file:" URL entries. In the interest of compatibility with this long-standing behavior, "file:" entries in the Class-Path of JARs loaded from the local disk should be allowed.

This change will not affect the current default behavior, but hopefully in the near future, the Class-Path enforcement code can be enabled by default, and the change be reflected in the JAR spec[3].

Automated build+test passes cleanly.

Thanks,
-Brent

1. https://bugs.openjdk.java.net/browse/JDK-8216401
2. https://docs.oracle.com/en/java/javase/11/docs/specs/jar/jar.html#class-path-attribute
3. https://bugs.openjdk.java.net/browse/JDK-8211941

Reply via email to