Re: RFD: Query param discrepancy in unix/windows file Handler:openConnection

2025-04-02 Thread Eirik Bjørsnøs
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

Re: RFD: Query param discrepancy in unix/windows file Handler:openConnection

2025-04-02 Thread Alan Bateman
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

Re: RFD: Query param discrepancy in unix/windows file Handler:openConnection

2025-04-02 Thread Daniel Fuchs
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

RFD: Query param discrepancy in unix/windows file Handler:openConnection

2025-04-01 Thread Eirik Bjørsnøs
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