On Wed, Apr 2, 2025 at 2:20 PM Alan Bateman wrote:
As a general point, neither method is correct when converting from a
> file URL to a file path. Much of the code here goes back to JDK 1.2 so
> we have to be careful with any changes.
>
Thanks Alan & Daniel.
Yes, I agree that the value of "fixi
On 01/04/2025 20:09, Eirik Bjørsnøs wrote:
:
Looking at the Windows implementation of
sun.net.protocol.www.file.Handler, it indeed uses URL::getFile when
constructing the file path, while the unix implementation uses
URL::getPath.
As a general point, neither method is correct when conver
Hi Eirik,
This is an old API and I suspect the current behavior has
been here from the start. I would prefer not to change
it, unless we really have to.
best regards,
-- daniel
On 01/04/2025 20:09, Eirik Bjørsnøs wrote:
Hi,
*Observation:*
On Unix and Windows respectively, the following code
Hi,
*Observation:*
On Unix and Windows respectively, the following code runs fine:
Unix:
jshell> new URL("file://localhost/etc/hosts").openStream();
$8 ==> java.io.BufferedInputStream@59f95c5d
Windows:
jshell> new
java.net.URL("file://localhost/C:/Windows/System32/drivers/etc/hosts").openStream