/C:/blah... is “root relative”. The (old) spec says the URL must be "relative to the code base". What does "code base" mean when not referring to Applets or RMI?
This seems like a bad idea (security hole) that worked by accident. Scott On Wed, Nov 20, 2019 at 10:00 AM Alan Bateman <alan.bate...@oracle.com> wrote: > On 20/11/2019 13:50, David Lloyd wrote: > > : > > OK, but this decision violates both the old and updated spec (and > > makes it difficult to write code that works in both cases: in > > situations that reject absolute URLs (javac) and in situations that > > reject drive letters (this code)), so I would request that this be > > revisited. > > > This cannot be rushed as it require detailed security analysis. Is there > any reason why you need to encode absolute file paths as relative URLs? > I assume the use-case discussed here will work if File::toURI or toURL > is used to create the file URL as it will have the "file:" scheme. > > -Alan >