RFR: 8157716: jdk.internal.loader.ClassLoaders.addURLToUCP() should return converted real path URL
Alan Bateman
Alan.Bateman at oracle.com
Wed May 25 18:20:25 UTC 2016
On 24/05/2016 23:02, Martin Buchholz wrote:
> On Tue, May 24, 2016 at 11:49 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
>
>> Yeah, the context isn't clear here. This is all related to the HotSpot CDS
>> feature and so very tied to the built-in class loaders. File paths are
>> recorded at -Xshare:dump time and checked at -Xshare:on time. Too many types
>> of fie path and corner cases on Windows for the VM to get it right.
> Canonicalization is reasonable for checking whether two files are the
> same (but of course it's not reliable!). But it should be explained -
> it is not at all obvious how this code relates to CDS... and the
> resulting canonicalized paths should never be exposed to the user,
> e.g. in java.class.path.
It's not exposed in the value of java.class.path but URLs to resources
on the class path are based on the canonical file path. It would be nice
to not need that but this behavior has been there for a long time (we
still JDK 1.2) so we have to be cautious about changing it.
-Alan
More information about the core-libs-dev
mailing list