RFR: 8157716: jdk.internal.loader.ClassLoaders.addURLToUCP() should return converted real path URL

Jiangli Zhou jiangli.zhou at Oracle.COM
Tue May 24 20:00:14 UTC 2016


Hi Martin,

Thanks for the review.

> On May 24, 2016, at 10:57 AM, Martin Buchholz <martinrb at google.com> wrote:
> 
> English syntax error.
> 
> +     * Attempts to convert to the given string to a file URL.
> 

Will fix.

> ---
> 
> There should be some motivation for why you are calling toRealPath,
> and e.g. not toAbsolutePath.
> What problem are you trying to solve?

The toRealPath() method is used by the class loader code in the core library to convert each element in the class path to its real path. The VM also needs to retrieve the path information when loading CDS archived classes. The VM behavior needs be consistent with the core library when handling the class path. That’s why the new API is created for both the library and VM code to use.

Thanks,
Jiangli

> 
> At Google we have special needs - this is the kind of change we end up
> locally reverting.
> 
> 
> On Tue, May 24, 2016 at 10:47 AM, Jiangli Zhou <jiangli.zhou at oracle.com> wrote:
>> Hi,
>> 
>> Please review the following webrev that changes the jdk.internal.loader.ClassLoaders.addURLToUCP() to java.internal.loader.ClassLoaders.toFileURL(). The change is provided by Alan (thanks, Alan!).
>> 
>> webrev: http://cr.openjdk.java.net/~jiangli/8157716/webrev.00/
>> but: https://bugs.openjdk.java.net/browse/JDK-8157716
>> 
>> Thanks,
>> Jiangli
>> 
>> 




More information about the core-libs-dev mailing list