JDK-8218268: Javac treats Manifest Class-Path entries as Paths instead of URLs

Mandy Chung mandy.chung at oracle.com
Fri Dec 6 19:23:10 UTC 2019


On 12/5/19 1:35 PM, Jonathan Gibbons wrote:
>
> Please review a small change to javac, to use java.net.URL instead of 
> java.nio.file.Path to evaluate the Class-Path in a JAR-file manifest.
>
> There is no test because:
>
>   * the change mirrors a corresponding change in
>     jdk.internal.loader.URLClassPath
>   * the change is simple
>   * it would be complicated to set up a multi-platform multi-protocol test
>
> The change is a subset of the code in URLClassPath (just the 
> `tryResolveFile` method) because javac only supports the use of local 
> JAR files (and not JAR files accessed by other URL protocols.)
>
> -- Jon
>
> JBS: https://bugs.openjdk.java.net/browse/JDK-8218268
> Webrev: http://cr.openjdk.java.net/~jjg/8218268/webrev/
>

Looks fine to me.   The two if statements can be folded into a single if 
statement.

Mandy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20191206/3b678286/attachment.html>


More information about the compiler-dev mailing list