RFR [9] 8152277: Move URLClassPath.pathToURLs(String) to RegistryImpl

Alan Bateman Alan.Bateman at oracle.com
Mon Mar 21 18:35:42 UTC 2016

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 URLClassPath::pathToURLs.
> 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 ).
> http://cr.openjdk.java.net/~chegar/8152277/
> https://bugs.openjdk.java.net/browse/JDK-8152277
Rather than using ParseUtils then you could just do:
    URL url = Paths.get(p).toRealPath().toUri().toURL();

Also I assume that pathToURLs does not need to be public.


More information about the core-libs-dev mailing list