Withdrawn: 8304065: HttpServer.stop should terminate immediately if no exchanges are in progress

2025-06-19 Thread Eirik Bjørsnøs
On Sat, 5 Apr 2025 10:23:33 GMT, Eirik Bjørsnøs wrote: > Please help review this PR which improves `HttpServer::stop` termination > timing to better fit user expectations. > > This PR: > > * Makes `ServerImpl::stop` continue without delay when there are no active > exch

Integrated: 8353440: Disable FTP fallback for non-local file URLs by default

2025-05-08 Thread Eirik Bjørsnøs
On Tue, 15 Apr 2025 12:00:10 GMT, Eirik Bjørsnøs wrote: > Please help review this PR which disables the unspecified but long-standing > feature where an `FtpURLConnection` is opened as a fallback for non-local > file URLs. > > Before this change, if a file URL has a non-local

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v14]

2025-05-07 Thread Eirik Bjørsnøs
On Fri, 2 May 2025 20:32:27 GMT, Eirik Bjørsnøs wrote: >> Please help review this PR which disables the unspecified but long-standing >> feature where an `FtpURLConnection` is opened as a fallback for non-local >> file URLs. >> >> Before this change, if a

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v14]

2025-05-06 Thread Eirik Bjørsnøs
On Fri, 2 May 2025 20:32:27 GMT, Eirik Bjørsnøs wrote: >> Please help review this PR which disables the unspecified but long-standing >> feature where an `FtpURLConnection` is opened as a fallback for non-local >> file URLs. >> >> Before this change, if a

Re: RFR: 8356154: Respecify java.net.Socket constructors that allow creating UDP sockets to throw IllegalArgumentException [v2]

2025-05-05 Thread Eirik Bjørsnøs
On Mon, 5 May 2025 11:07:28 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which proposes to respecify the 2 >> `java.net.Socket` constructors that allow construction of UDP sockets? This >> addresses https://bugs.openjdk.org/browse/JDK-8356154. >> >> As noted in that JBS

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v14]

2025-05-02 Thread Eirik Bjørsnøs
exceptional behavior in FtpConnection when using non-local > file URLs with FTP fallback enabled from `OpenStream` to `NonLocalFtpFallback` > > I have added a Release Note as a subtask in the JBS issue, this also needs a > review. Eirik Bjørsnøs has updated the pull request incrementally w

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v13]

2025-05-02 Thread Eirik Bjørsnøs
exceptional behavior in FtpConnection when using non-local > file URLs with FTP fallback enabled from `OpenStream` to `NonLocalFtpFallback` > > I have added a Release Note as a subtask in the JBS issue, this also needs a > review. Eirik Bjørsnøs has updated the pull request incrementall

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v10]

2025-04-30 Thread Eirik Bjørsnøs
On Mon, 28 Apr 2025 09:21:54 GMT, Michael McMahon wrote: > > > I have added a Release Note as a subtask in the JBS issue, this also > > > needs a review. > > > > > > Hi Eirik, I have updated the wording of the release note at > > https://bugs.openjdk.org/browse/JDK-8354658 ; @AlanBateman or

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v11]

2025-04-25 Thread Eirik Bjørsnøs
On Fri, 25 Apr 2025 18:48:48 GMT, Daniel Fuchs wrote: > MalformedURLException could be thrown while constructing the URL... Good catch, fixed. - PR Review Comment: https://git.openjdk.org/jdk/pull/24657#discussion_r2060739140

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v12]

2025-04-25 Thread Eirik Bjørsnøs
exceptional behavior in FtpConnection when using non-local > file URLs with FTP fallback enabled from `OpenStream` to `NonLocalFtpFallback` > > I have added a Release Note as a subtask in the JBS issue, this also needs a > review. Eirik Bjørsnøs has updated the pull request increment

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v10]

2025-04-25 Thread Eirik Bjørsnøs
On Fri, 25 Apr 2025 17:30:41 GMT, Daniel Fuchs wrote: > Sorry - rewording the release note got me thinking again... Documentation Driven Development For The Win! 👍 > src/java.base/share/classes/sun/net/www/protocol/file/FileURLConnection.java > line 55: > >> 53: System.getProperty

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v11]

2025-04-25 Thread Eirik Bjørsnøs
exceptional behavior in FtpConnection when using non-local > file URLs with FTP fallback enabled from `OpenStream` to `NonLocalFtpFallback` > > I have added a Release Note as a subtask in the JBS issue, this also needs a > review. Eirik Bjørsnøs has updated the pull request incremental

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v5]

2025-04-25 Thread Eirik Bjørsnøs
On Wed, 23 Apr 2025 17:04:30 GMT, Eirik Bjørsnøs wrote: >> src/java.base/share/classes/java/net/doc-files/net-properties.html line 174: >> >>> 172: >>> 173: File URL stream protocol handler properties >>> 174: The following properties are used to confi

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v6]

2025-04-25 Thread Eirik Bjørsnøs
On Fri, 25 Apr 2025 12:25:53 GMT, Daniel Fuchs wrote: > Will do. Great! > The CSR could also be moved to "Proposed". It was earlier today. - PR Comment: https://git.openjdk.org/jdk/pull/24657#issuecomment-2830292381

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default

2025-04-25 Thread Eirik Bjørsnøs
On Wed, 23 Apr 2025 18:28:48 GMT, Daniel Fuchs wrote: > Two tests under `java/net/` are now failing on windows with the message: > "Unsupported non-local file URL" > > java/net/URL/OpenStream.java > java/net/URLConnection/UNCTest.java With the updates to `OpenStream` in this PR and the updates

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v10]

2025-04-25 Thread Eirik Bjørsnøs
bles the feature. > * Updates the existing test `NonLocalFtpFallback` to enable the feature via > said system property. > * Adds a new test `NonLocalFtpFallbackDisabled` verifying that a > `MalformedURLException` is thrown by default for a non-local URL host > component. > > I

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v9]

2025-04-25 Thread Eirik Bjørsnøs
bles the feature. > * Updates the existing test `NonLocalFtpFallback` to enable the feature via > said system property. > * Adds a new test `NonLocalFtpFallbackDisabled` verifying that a > `MalformedURLException` is thrown by default for a non-local URL host > component. > > I

Integrated: 8355475: UNCTest should use an existing UNC path

2025-04-25 Thread Eirik Bjørsnøs
On Thu, 24 Apr 2025 08:12:37 GMT, Eirik Bjørsnøs wrote: > Please review this test-only PR which updates `UNCTest.java` to use a UNC > path which is known to exist. > > The test currently uses the file URL > `file://jdk/LOCAL-JAVA/jdk1.4/win/README.txt`, but since this

Re: RFR: 8355475: UNCTest should use an existing UNC path [v4]

2025-04-25 Thread Eirik Bjørsnøs
On Fri, 25 Apr 2025 11:13:18 GMT, Daniel Fuchs wrote: >> Eirik Bjørsnøs has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Some spell fixes and comment tweaks >> - Use Java-style array declaration > >

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v6]

2025-04-25 Thread Eirik Bjørsnøs
On Fri, 25 Apr 2025 09:44:34 GMT, Daniel Fuchs wrote: > I wonder if we need to add a comment in OpenStream that "bad" UNC paths are > tested in NonLocalFtpFallback. We could. But there is technincally no such thing as a "bad" UNC path though. If File::exists fails, then it isn't considered a U

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v6]

2025-04-25 Thread Eirik Bjørsnøs
On Fri, 25 Apr 2025 09:55:52 GMT, Eirik Bjørsnøs wrote: > I wonder if we need to add a comment in OpenStream that "bad" UNC paths are > tested in NonLocalFtpFallback. Could we say something like: _For testing of non-local file URLs with the legacy FTP fallback feat

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v8]

2025-04-25 Thread Eirik Bjørsnøs
bles the feature. > * Updates the existing test `NonLocalFtpFallback` to enable the feature via > said system property. > * Adds a new test `NonLocalFtpFallbackDisabled` verifying that a > `MalformedURLException` is thrown by default for a non-local URL host > component. > > I

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v6]

2025-04-25 Thread Eirik Bjørsnøs
On Wed, 23 Apr 2025 17:34:33 GMT, Eirik Bjørsnøs wrote: >> Please help review this PR which disables the unspecified but long-standing >> feature where an `FtpURLConnection` is opened as a fallback for non-local >> file URLs. >> >> Before this change, if a

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v7]

2025-04-25 Thread Eirik Bjørsnøs
bles the feature. > * Updates the existing test `NonLocalFtpFallback` to enable the feature via > said system property. > * Adds a new test `NonLocalFtpFallbackDisabled` verifying that a > `MalformedURLException` is thrown by default for a non-local URL host > component. > > I

Re: RFR: 8355475: UNCTest should use an existing UNC path [v4]

2025-04-24 Thread Eirik Bjørsnøs
7;s CI verifying a successful run (without skipping) would > be welcome. > > This is a test only PR, `noreg-self` has been added in the JBS. Eirik Bjørsnøs has updated the pull request incrementally with two additional commits since the last revision: - Some spell fixes and comment tw

Re: RFR: 8355475: UNCTest should use an existing UNC path [v2]

2025-04-24 Thread Eirik Bjørsnøs
On Thu, 24 Apr 2025 17:44:47 GMT, Daniel Fuchs wrote: > My gut feeling is that using `path.replace` here makes what's going on more > obscure. I would keep the original string: `"file://" + hostName > +"/C$/Windows"` Right, String::replace was not very helpful here. Reverted as per your sugge

Re: RFR: 8355475: UNCTest should use an existing UNC path [v3]

2025-04-24 Thread Eirik Bjørsnøs
7;s CI verifying a successful run (without skipping) would > be welcome. > > This is a test only PR, `noreg-self` has been added in the JBS. Eirik Bjørsnøs has updated the pull request incrementally with one additional commit since the last revision: String::replace was not helpful here

Re: RFR: 8355475: UNCTest should use an existing UNC path [v2]

2025-04-24 Thread Eirik Bjørsnøs
On Thu, 24 Apr 2025 16:12:17 GMT, Mikhail Yankelevich wrote: >> Eirik Bjørsnøs has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contain

Re: RFR: 8355475: UNCTest should use an existing UNC path [v2]

2025-04-24 Thread Eirik Bjørsnøs
7;s CI verifying a successful run (without skipping) would > be welcome. > > This is a test only PR, `noreg-self` has been added in the JBS. Eirik Bjørsnøs has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes b

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v6]

2025-04-24 Thread Eirik Bjørsnøs
On Thu, 24 Apr 2025 10:08:10 GMT, Daniel Fuchs wrote: > You will still need to update `java/net/URL/OpenStream.java` to make it pass > with the new changes. Possibly have two `@run`, one with > `-Djdk.net.file.ftpfallback=true` and one without and adapt the test > expectation based on the pres

Re: RFR: 8355475: UNCTest should use an existing UNC path

2025-04-24 Thread Eirik Bjørsnøs
On Thu, 24 Apr 2025 10:03:12 GMT, Daniel Fuchs wrote: > It would be good to get feedback from @bplb on this. Is the plan to integrate > this change before https://git.openjdk.org/jdk/pull/24657 ? A plan may be a strong word, but yes, that would probably be nice since we would otherwise need to

RFR: 8355475: UNCTest should use an existing UNC path

2025-04-24 Thread Eirik Bjørsnøs
Please review this test-only PR which updates `UNCTest.java` to use a UNC path which is known to exist. The test currently uses the file URL `file://jdk/LOCAL-JAVA/jdk1.4/win/README.txt`, but since this is unlikely to resolve to an existing UNC path on any CI server, the test doesn't really ve

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v6]

2025-04-24 Thread Eirik Bjørsnøs
On Wed, 23 Apr 2025 17:34:33 GMT, Eirik Bjørsnøs wrote: >> Please help review this PR which disables the unspecified but long-standing >> feature where an `FtpURLConnection` is opened as a fallback for non-local >> file URLs. >> >> Before this change, if a

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v6]

2025-04-23 Thread Eirik Bjørsnøs
On Wed, 23 Apr 2025 19:24:33 GMT, Eirik Bjørsnøs wrote: > This should probably be mentioned in the compatibility risk section of the > CSR, and in the release note too. I have updated both to mention code affected by relying on behavior of a failing `FtpURLConnection`, such as ca

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v6]

2025-04-23 Thread Eirik Bjørsnøs
nent. > > I have added a Release Note as a subtask in the JBS issue, this also needs a > review. Eirik Bjørsnøs has updated the pull request incrementally with one additional commit since the last revision: Fix repeated "should should" - Changes: - all: h

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default

2025-04-23 Thread Eirik Bjørsnøs
On Wed, 23 Apr 2025 18:28:48 GMT, Daniel Fuchs wrote: > java/net/URLConnection/UNCTest.java It's not completely clear to me whether this test was originally written under the assumption that a FileURLConnection for an UNC path would be returned by this test. If so, the CI instance running the

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v6]

2025-04-23 Thread Eirik Bjørsnøs
On Wed, 23 Apr 2025 18:39:05 GMT, Daniel Fuchs wrote: > The `java/net/URL/OpenStream.java` test however shows a potential > compatibility issue: it was expecting `UnknownHostException` and gets > `MalformedURLException` instead. > > This should probably be mentioned in the compatibility risk s

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v6]

2025-04-23 Thread Eirik Bjørsnøs
On Wed, 23 Apr 2025 17:34:33 GMT, Eirik Bjørsnøs wrote: >> Please help review this PR which disables the unspecified but long-standing >> feature where an `FtpURLConnection` is opened as a fallback for non-local >> file URLs. >> >> Before this change, if a

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v5]

2025-04-23 Thread Eirik Bjørsnøs
On Wed, 23 Apr 2025 12:29:03 GMT, Eirik Bjørsnøs wrote: >> Please help review this PR which disables the unspecified but long-standing >> feature where an `FtpURLConnection` is opened as a fallback for non-local >> file URLs. >> >> Before this change, if a

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default

2025-04-23 Thread Eirik Bjørsnøs
On Wed, 23 Apr 2025 15:46:23 GMT, Daniel Fuchs wrote: > Good question. I believe disabling is a good first step, which will hopefully > tell us whether anyone is actually using it. I'm curious what the feelback channel would be here? Do vendors collect metrics for use of system properties, dir

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v5]

2025-04-23 Thread Eirik Bjørsnøs
On Wed, 23 Apr 2025 15:57:00 GMT, Daniel Fuchs wrote: > I wonder if it should say the `{@code file:}` scheme instead. This seems like an improvement to me. Not really a deliberate choice to include the slashes on my part, probably more for consistency with other schemes under Proxy. Files wit

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default

2025-04-23 Thread Eirik Bjørsnøs
On Wed, 23 Apr 2025 11:01:48 GMT, Daniel Fuchs wrote: > Sorry for being late to the party. I too would welcome the removal of this > old legacy feature. We have not really discussed a future removal of this feature in the context of this PR. This PR simply disables the feature by default. If

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default

2025-04-23 Thread Eirik Bjørsnøs
On Wed, 23 Apr 2025 11:01:48 GMT, Daniel Fuchs wrote: > There are no handlers for URIs - only for URLs - so I would replace URI with > URL in the property description to avoid any confusion. I just realized I had initially put this under the Proxies section. That does not make much sense, so I

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v5]

2025-04-23 Thread Eirik Bjørsnøs
nent. > > I have added a Release Note as a subtask in the JBS issue, this also needs a > review. Eirik Bjørsnøs has updated the pull request incrementally with one additional commit since the last revision: Move file URL properties out of the Proxy section, replace URI with U

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v4]

2025-04-23 Thread Eirik Bjørsnøs
nent. > > I have added a Release Note as a subtask in the JBS issue, this also needs a > review. Eirik Bjørsnøs has updated the pull request incrementally with one additional commit since the last revision: Be explicit about explicit {@code ftp://} URIs - Changes: - a

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default

2025-04-23 Thread Eirik Bjørsnøs
On Tue, 22 Apr 2025 08:53:54 GMT, Michael McMahon wrote: > No objection here to this change either. Thanks for your help in making progress here! > The property will need to be documented in > src/java.base/share/classes/java/net/doc-files/net-properties.html also. I have made a first attemp

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v3]

2025-04-23 Thread Eirik Bjørsnøs
nent. > > I have added a Release Note as a subtask in the JBS issue, this also needs a > review. Eirik Bjørsnøs has updated the pull request incrementally with one additional commit since the last revision: Document jdk.net.file.ftpfallback as a Networking Property - Cha

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v2]

2025-04-22 Thread Eirik Bjørsnøs
nent. > > I have added a Release Note as a subtask in the JBS issue, this also needs a > review. Eirik Bjørsnøs has updated the pull request incrementally with one additional commit since the last revision: Rename system property to "jdk.net.file.ftpfallback" -

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default

2025-04-21 Thread Eirik Bjørsnøs
On Mon, 21 Apr 2025 07:05:05 GMT, Alan Bateman wrote: > No objection to disabling this legacy feature by default but I think it will > require writing a release note, and thus will document the system property Indeed. A provisional release note can be found here: https://bugs.openjdk.org/brow

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default

2025-04-20 Thread Eirik Bjørsnøs
On Tue, 15 Apr 2025 12:00:10 GMT, Eirik Bjørsnøs wrote: > Please help review this PR which disables the unspecified but long-standing > feature where an `FtpURLConnection` is opened as a fallback for non-local > file URLs. > > Before this change, if a file URL has a non-local

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default

2025-04-15 Thread Eirik Bjørsnøs
On Tue, 15 Apr 2025 20:09:39 GMT, Eirik Bjørsnøs wrote: > The current behavior for _existing_ UNC paths would be unaffected by this > change. For the sake of completeness: If `Files::exists` failed for a UNC path before this change, then the code would continue to the FTP fallback a

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default

2025-04-15 Thread Eirik Bjørsnøs
On Tue, 15 Apr 2025 19:08:00 GMT, Bernd wrote: > Is there a Risk that This breaks Applications which parses Potential UNC path > as URL (or even worse want to open them?. I am not sure if this actually ever > worked, but) I know people are reguläres confused about file:/// (when is it > needed

RFR: 8353440: Disable FTP fallback for non-local file URLs by default

2025-04-15 Thread Eirik Bjørsnøs
Please help review this PR which disables the unspecified but long-standing feature where an `FtpURLConnection` is opened as a fallback for non-local file URLs. Before this change, if a file URL has a non-local host component, say `file://remotehost/folder/data.txt`, then the implementation wo

Integrated: 8353662: Add test for non-local file URL fallback to FTP

2025-04-11 Thread Eirik Bjørsnøs
On Thu, 3 Apr 2025 15:44:44 GMT, Eirik Bjørsnøs wrote: > Please review this test-only PR which introduces testing of the unspecified > but long-standing fallback to FTP for non-local files in the 'file' URL > scheme. > > This in preparation for the upcoming proposal

Re: RFR: 8353662: Add test for non-local file URL fallback to FTP [v3]

2025-04-11 Thread Eirik Bjørsnøs
On Fri, 4 Apr 2025 10:37:58 GMT, Eirik Bjørsnøs wrote: >> Please review this test-only PR which introduces testing of the unspecified >> but long-standing fallback to FTP for non-local files in the 'file' URL >> scheme. >> >> This in preparation

Re: RFR: 8353662: Add test for non-local file URL fallback to FTP [v3]

2025-04-11 Thread Eirik Bjørsnøs
On Fri, 4 Apr 2025 10:48:38 GMT, Daniel Fuchs wrote: > Generally looks good. Does this mean you think the PR is good for approval now that the IP version aspect has been taken care of? Or would you like more time/people to review this test-only enhancement? - PR Review Comment: h

Re: RFR: 8301991: Convert l10n properties resource bundles to UTF-8 native [v2]

2025-04-10 Thread Eirik Bjørsnøs
On Wed, 13 Sep 2023 17:38:28 GMT, Justin Lu wrote: >> JDK .properties files still use ISO-8859-1 encoding with escape sequences. >> It would improve readability to see the native characters instead of escape >> sequences (especially for the L10n process). The majority of files changed >> are l

Re: RFR: 8301991: Convert l10n properties resource bundles to UTF-8 native [v6]

2025-04-10 Thread Eirik Bjørsnøs
On Thu, 10 Apr 2025 07:32:18 GMT, Magnus Ihse Bursie wrote: >> You don't have to do that, I'm working on an omnibus UTF-8 fixing PR right >> now, where I will include a fix for this as well. > > If anything, I might be a bit worried that there are more incorrect > conversions stemming from this

Integrated: 8353278: Consolidate local file URL checks in jar: and file: URL schemes

2025-04-07 Thread Eirik Bjørsnøs
On Mon, 31 Mar 2025 14:46:32 GMT, Eirik Bjørsnøs wrote: > Please help review this cleanup PR which consolidates 'local file' URL checks > across the 'file:' and 'jar:' URL scheme implementations and defines this > check in terms of RFC 8089

Re: RFR: 8304065: HttpServer.stop should terminate immediately if no exchanges are in progress

2025-04-07 Thread Eirik Bjørsnøs
On Mon, 7 Apr 2025 14:00:50 GMT, Daniel Fuchs wrote: > Unless I'm not mistaken this is not going to be a trivial fix. Alright, I'll convert this to a draft PR for now. I may explore solutions, but it seems a full fix could be above my pay grade. - PR Review Comment: https://git.op

Re: RFR: 8353278: Consolidate local file URL checks in jar: and file: URL schemes [v2]

2025-04-07 Thread Eirik Bjørsnøs
On Mon, 7 Apr 2025 13:13:40 GMT, Jaikiran Pai wrote: > Hello Eirik, these changes look good to me and merely centralizing the logic > to one single `ParseUtil.isLocalFileURL()` method. Thank you for cleaning > this up. Thank you for verifying! > The copyright year on `URLJarFile.java` will ne

Re: RFR: 8353278: Consolidate local file URL checks in jar: and file: URL schemes [v2]

2025-04-07 Thread Eirik Bjørsnøs
andler.openConnection` to use > `isLocalFileURL` in windows/unix implementations > > This is a pure cleanup / refactoring PR, no tests are updated here. Existing > testing in this area seems sparse, so I have tried to limit the number of > code tweaks to a minimium to make r

RFR: 8353278: Consolidate local file URL checks in jar: and file: URL schemes

2025-04-05 Thread Eirik Bjørsnøs
Please help review this cleanup PR which consolidates 'local file' URL checks across the 'file:' and 'jar:' URL scheme implementations and defines this check in terms of RFC 8089, Section 2. This PR: * Moves `URLJarFile.isFileURL` to `sun.net.www.ParseUtil` where it is documented according to

RFR: 8304065: HttpServer.stop should terminate immediately if no exchanges are in progress

2025-04-05 Thread Eirik Bjørsnøs
Please help review this PR which improves `HttpServer::stop` termination timing to better fit user expectations. This PR: * Makes `ServerImpl::stop` continue without delay when there are no active exchanges during shutdown * Attempts to interrupt the dispatcher thread before joining it, giving

Re: RFR: 8353662: Add test for non-local file URL fallback to FTP [v2]

2025-04-04 Thread Eirik Bjørsnøs
temporarly moving this test to tier1, I was able to confirm this test runs > green also on Windows GHA. Eirik Bjørsnøs has updated the pull request incrementally with one additional commit since the last revision: Do not assume that the loopback address is IPv4 - Chang

Re: RFR: 8353662: Add test for non-local file URL fallback to FTP [v3]

2025-04-04 Thread Eirik Bjørsnøs
On Fri, 4 Apr 2025 10:58:51 GMT, Daniel Fuchs wrote: > Interesting. That looks like a bug to me. stop() should probably look at > `exchangeCount` too - but that will require some thinking to get the > asynchronous stops to work correctly. Should be worth logging a bug :-) Let's see if this cap

Re: RFR: 8353662: Add test for non-local file URL fallback to FTP [v2]

2025-04-04 Thread Eirik Bjørsnøs
On Fri, 4 Apr 2025 10:19:29 GMT, Daniel Fuchs wrote: > The URL should not assume that the loopback is an IPv4 address. Or is this > handled by the proxy? Right. The following returns "127.0.0.1" for me, would that be the correct API to use? `InetAddress.getLoopbackAddress().getHostAddress()`

Re: RFR: 8353662: Add test for non-local file URL fallback to FTP [v3]

2025-04-04 Thread Eirik Bjørsnøs
temporarly moving this test to tier1, I was able to confirm this test runs > green also on Windows GHA. Eirik Bjørsnøs has updated the pull request incrementally with one additional commit since the last revision: Use a fake host name since no actual FTP request will be attempted -

Re: RFR: 8353662: Add test for non-local file URL fallback to FTP [v3]

2025-04-04 Thread Eirik Bjørsnøs
On Fri, 4 Apr 2025 10:37:58 GMT, Eirik Bjørsnøs wrote: >> Please review this test-only PR which introduces testing of the unspecified >> but long-standing fallback to FTP for non-local files in the 'file' URL >> scheme. >> >> This in preparation

Re: RFR: 8353662: Add test for non-local file URL fallback to FTP [v2]

2025-04-04 Thread Eirik Bjørsnøs
On Fri, 4 Apr 2025 10:25:01 GMT, Daniel Fuchs wrote: > Ok - I see that 127.0.0.1 should not be directly used. Would it work if we > replaced that with a fake host name then? Yeah, you're right, the FTP request never materializes (our proxy just swallows it). So we only use it to assert against

RFR: 8353662: Add test for non-local file URL fallback to FTP

2025-04-03 Thread Eirik Bjørsnøs
Please review this test-only PR which introduces testing of the unspecified but long-standing fallback to FTP for non-local files in the 'file' URL scheme. This in preparation for the upcoming proposal to disable the feature by default in JDK-8353440. Since we cannot reliably bind an FTP serve

Re: RFR: 8353278: Consolidate local file URL checks in jar: and file: URL schemes

2025-04-03 Thread Eirik Bjørsnøs
On Thu, 3 Apr 2025 10:12:44 GMT, Daniel Fuchs wrote: > My tests came back green - but it wouldn't hurt to have another > reviewer/committer eyeball these changes before integrating. As far as I > could tell - the code with the new changes is strictly equivalent to the old. Thanks Daniel! I'v

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

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

Re: RFD: FTP fallback of the 'file:' URL scheme

2025-04-01 Thread Eirik Bjørsnøs
On Mon, Mar 31, 2025 at 8:34 AM Alan Bateman wrote: > I recall digging into this a long time ago and concluded that it's was > an interpretation of RFC 1738 section 3.10. I can't imagine anything > relying on this in 2025 so disabling it, and introducing a system > property to allow, seems reaso

Re: RFD: Use of ~ (tilde) when considering local and non-local file URLs

2025-04-01 Thread Eirik Bjørsnøs
On Wed, Mar 26, 2025 at 11:13 AM Eirik Bjørsnøs wrote: > > In any case, I think if we could add the tilde logic > to JarFileFactory::urlFor, then all these four checks would be equivalent > and a prime candidate for a consolidating cleanup PR, perhaps also > expanding a bit on th

RFD: FTP fallback of the 'file:' URL scheme

2025-03-29 Thread Eirik Bjørsnøs
Hi, The long-standing FTP fallback feature supported by the 'file:' URL scheme handler seems dubious to me: 1: It does not follow the principle of least surprise. At least for me, it's a reasonable expectation that a file: URL should only interact with files using only the file system. The curren

Re: RFD: Use of ~ (tilde) when considering local and non-local file URLs

2025-03-27 Thread Eirik Bjørsnøs
On Thu, Mar 27, 2025 at 3:03 PM Jaikiran Pai wrote: > Hello Eirik, > > The code in URLJarFile which does that check for "~" seems to have been > introduced for https://bugs.openjdk.org/browse/JDK-4447921. It doesn't > tell why the "~" was necessary. > Similar to the Unix history of using "~" as

Re: RFD: Use of ~ (tilde) when considering local and non-local file URLs

2025-03-27 Thread Eirik Bjørsnøs
On Thu, Mar 27, 2025 at 3:03 PM Jaikiran Pai wrote: > Hello Eirik, > > The code in URLJarFile which does that check for "~" seems to have been > introduced for https://bugs.openjdk.org/browse/JDK-4447921. It doesn't > tell why the "~" was necessary. > > In any case, I don't think any kind of clea

Re: RFD: Use of ~ (tilde) when considering local and non-local file URLs

2025-03-26 Thread Eirik Bjørsnøs
On Wed, Mar 26, 2025 at 11:13 AM Eirik Bjørsnøs wrote: > In JarFileFactory::urlFor however, the logic is slightly different in that > the comparison with ~ (tilde) is missing: > > String host = url.getHost(); > if (host != null && !host.isEmpty() && >

RFD: Use of ~ (tilde) when considering local and non-local file URLs

2025-03-26 Thread Eirik Bjørsnøs
Hi, Various URL scheme code paths contain branches for local or non-local file URLs: See URLJarFile::isFileURL for an example where the host is compared as follows: String host = url.getHost(); if (host == null || host.isEmpty() || host.equals("~") || host.equalsIgnoreCase("localhost"))

Integrated: 8352858: Make java.net.JarURLConnection fields final

2025-03-25 Thread Eirik Bjørsnøs
On Tue, 25 Mar 2025 08:33:57 GMT, Eirik Bjørsnøs wrote: > Please help review this cleanup PR which makes the > `java.net.JarURLConnection` fields `jarFileURL` and `entryName` final. > > The current `parseSpec` method is somewhat crufty, with some code quality > issues which

Re: RFR: 8352858: Make java.net.JarURLConnection fields final [v2]

2025-03-25 Thread Eirik Bjørsnøs
On Tue, 25 Mar 2025 21:06:29 GMT, Daniel Fuchs wrote: >> src/java.base/share/classes/java/net/JarURLConnection.java line 165: >> >>> 163: int separatorIndex = spec.indexOf("!/"); >>> 164: >>> 165: // REMIND: we don't handle nested JAR URLs >> >> Just noticed that this comment s

Re: RFR: 8352858: Make java.net.JarURLConnection fields final [v2]

2025-03-25 Thread Eirik Bjørsnøs
On Tue, 25 Mar 2025 09:39:07 GMT, Eirik Bjørsnøs wrote: >> Please help review this cleanup PR which makes the >> `java.net.JarURLConnection` fields `jarFileURL` and `entryName` final. >> >> The current `parseSpec` method is somewhat crufty, with some code quality >

Re: RFR: 8352858: Make java.net.JarURLConnection fields final [v2]

2025-03-25 Thread Eirik Bjørsnøs
On Tue, 25 Mar 2025 09:52:38 GMT, Jaikiran Pai wrote: >> Eirik Bjørsnøs has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Rename 'separator' to 'separatorIndex', 'nameIdx' to 

Re: RFR: 8352858: Make java.net.JarURLConnection fields final [v2]

2025-03-25 Thread Eirik Bjørsnøs
On Tue, 25 Mar 2025 09:27:15 GMT, Jaikiran Pai wrote: >> Eirik Bjørsnøs has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Rename 'separator' to 'separatorIndex', 'nameIdx' t

Re: RFR: 8352858: Make java.net.JarURLConnection fields final [v2]

2025-03-25 Thread Eirik Bjørsnøs
entry name. This allows the fields to be made final. > > Since this is purely a refactoring PR, no tests are updated and the > `noreg-cleanup` label is added in JBS. > > Reviewing individual commits in this PR may aid verification of separate > refactorings. Eirik Bjørsnøs has updated

RFR: 8352858: Make java.net.JarURLConnection fields final

2025-03-25 Thread Eirik Bjørsnøs
Please help review this cleanup PR which makes the `java.net.JarURLConnection` fields `jarFileURL` and `entryName` final. The current `parseSpec` method is somewhat crufty, with some code quality issues which this PR aims to improve: * The method-level comment seems stale and misplaced * The l

Integrated: 8342807: Update links in java.base to use https://

2025-01-27 Thread Eirik Bjørsnøs
On Tue, 22 Oct 2024 10:19:23 GMT, Eirik Bjørsnøs wrote: > Please review this cleanup PR which updates a total of 12 links to external > documentation or references in `java.base` to use https instead of plain text > http. > > Links in `java.security` and `share/data/tzdata` ar

Re: RFR: 8342807: Update links in java.base to use https:// [v5]

2025-01-24 Thread Eirik Bjørsnøs
On Tue, 21 Jan 2025 16:25:34 GMT, Roger Riggs wrote: > I agree doing (in this PR) anything more than fix the link is out of scope. Good. My understanding is that we are converging on a consensus to: * Change the broken IBM AIX emprempral port link to the suggested IBM FAQ one in `PortConfig.j

Integrated: 8344943: Mark not subclassable classes final in java.base exported classes

2025-01-24 Thread Eirik Bjørsnøs
On Tue, 26 Nov 2024 13:04:41 GMT, Eirik Bjørsnøs wrote: > Please review this PR which adds the `final` modifier to non-subclassable > classes in `java.base`. > > The classes were identified using an automated analysis. See CSR for details. > > Besides simply adding the `fina

Re: RFR: 8344943: Mark not subclassable classes final in java.base exported classes [v2]

2025-01-24 Thread Eirik Bjørsnøs
On Fri, 17 Jan 2025 18:19:56 GMT, Eirik Bjørsnøs wrote: >> Please review this PR which adds the `final` modifier to non-subclassable >> classes in `java.base`. >> >> The classes were identified using an automated analysis. See CSR for details. >> >> Besi

Integrated: 8345249: Apply some conservative cleanups in FileURLConnection

2025-01-24 Thread Eirik Bjørsnøs
On Fri, 29 Nov 2024 13:33:37 GMT, Eirik Bjørsnøs wrote: > Please review this PR which applies various cleanups to > `sun.net.www.protocol.file.FileURLConnection`. > > This class is known to be an _old, intricate, and hard to maintain piece of > code._ However, there are

Re: RFR: 8345249: Apply some conservative cleanups in FileURLConnection [v2]

2025-01-22 Thread Eirik Bjørsnøs
On Sat, 30 Nov 2024 18:39:01 GMT, Eirik Bjørsnøs wrote: >> Please review this PR which applies various cleanups to >> `sun.net.www.protocol.file.FileURLConnection`. >> >> This class is known to be an _old, intricate, and hard to maintain piece of >> code._ Howe

Re: RFR: 8342807: Update links in java.base to use https:// [v5]

2025-01-21 Thread Eirik Bjørsnøs
.opengroup.org" to "pubs.opengroup.org". Using this > new host in the URLs > > `unix/native/libjava/ProcessImpl_md.c` > A link to pasc.org now requires authentication. I changed this to be a > Wayback link. Alternantives would be to delete this link, or to tr

Re: RFR: 8342807: Update links in java.base to use https:// [v3]

2025-01-21 Thread Eirik Bjørsnøs
On Tue, 21 Jan 2025 06:51:10 GMT, Thomas Stuefe wrote: > > @tstuefe And you also agree that the link should be removed? (Which is what > > this PR is about) > > The 20+ years old link to the PASC error report I would probably remove; it > is likely outdated now. If one wanted to invest the tim

Re: RFR: 8342807: Update links in java.base to use https:// [v4]

2025-01-21 Thread Eirik Bjørsnøs
.opengroup.org" to "pubs.opengroup.org". Using this > new host in the URLs > > `unix/native/libjava/ProcessImpl_md.c` > A link to pasc.org now requires authentication. I changed this to be a > Wayback link. Alternantives would be to delete this link, or to tr

Re: RFR: 8342807: Update links in java.base to use https://

2025-01-17 Thread Eirik Bjørsnøs
On Tue, 22 Oct 2024 19:29:43 GMT, Eirik Bjørsnøs wrote: >> FWIW: I don't believe a change to a link in a comment in an internal class >> requires a CSR. >> For PortConfig.java - it would be good to have someone involved in the AIX >> port comment on the propo

Re: RFR: 8342807: Update links in java.base to use https:// [v3]

2025-01-17 Thread Eirik Bjørsnøs
.opengroup.org" to "pubs.opengroup.org". Using this > new host in the URLs > > `unix/native/libjava/ProcessImpl_md.c` > A link to pasc.org now requires authentication. I changed this to be a > Wayback link. Alternantives would be to delete this link, or to track down a

Re: RFR: 8344943: Mark not subclassable classes final in java.base exported classes [v2]

2025-01-17 Thread Eirik Bjørsnøs
> * Updates a note in `java.lang.constant.DynamicCallSiteDesc` to not reference > subtypes. See CSR for discussion. > * Removes the class `java.lang.Runtime` from the test > `test/jdk/jdk/internal/reflect/CallerSensitive/CheckCSMs.java` > * Updates the copyright year of affected source files Eirik B

  1   2   >