RFR  8152277: Move URLClassPath.pathToURLs(String) to RegistryImpl
chris.hegarty at oracle.com
Wed Mar 23 15:46:00 UTC 2016
On 21/03/16 18:35, Alan Bateman wrote:
> On 21/03/2016 17:45, Chris Hegarty wrote:
>> In the context of 8149122 & 8152190 it was noticed that
>> sun.rmi.registry.RegistryImpl is the only invoker of
>> Rather that adding a qualified export to java.rmi for this, it makes
>> sense to move
>> pathToURLs(String) to RegistryImpI ( and "modernize" the
>> implementation a little ).
> Rather than using ParseUtils then you could just do:
> URL url = Paths.get(p).toRealPath().toUri().toURL();
This is a little more "modernization" than I originally signed
up for ;-) but it has the advantage of not further polluting
the qualified exports, which is good.
> Also I assume that pathToURLs does not need to be public.
I'm not sure under what circumstances toRealPath can fail, but
I tried to be consistent with the old behavior.
More information about the core-libs-dev