Hi Alan,
On 04/22/2017 10:37 PM, Alan Bateman wrote:
On 22/04/2017 20:47, Peter Levart wrote:
:
Or this might work too:
http://cr.openjdk.java.net/~plevart/jdk9-dev/Path.toFile/webrev.01/
Only partly as there is also the issue of resolving paths associated
with one provider against a path associated with another.
So module system would need to keep using the builtin filesystem for any
Path manipulation after VM.isBooted. At least within the boot Layer.
There's no public API in module system that would return Path objects to
user, is it?
A variant of this might be for FileSystems.getDefault() to start
returning the custom default filesystem as soon as initLevel reaches
2 (after module system is initialized). This might allow custom
default file system to be effective even before the VM is fully
booted (for custom security manager or system class loader or java
agent to already take advantage of it).
When running with a custom file system provider then it's important
that objects associated with the built-in provider don't leak to user
code. So yes, getDefault() should return the custom file system after
the module system is initialized so that custom system class loaders,
custom security manager, and agents get objects associated with the
custom provider.
-Alan
Right. No user code should see builtin Path(s) when custom default file
system is configured.
Regards, Peter