RFR: 8352895: UserCookie.java runs wrong test class

2025-04-07 Thread Jaikiran Pai
Can I please get a review of this trivial test-only change which fixes the test definition to run the correct test class? This addresses https://bugs.openjdk.org/browse/JDK-8352895. The test code can be cleaned up a lot more. In fact, I have a local version with additional clean ups. But I deci

Re: RFR: 8353641: Deprecate core library permission classes for removal [v7]

2025-04-07 Thread Roger Riggs
> Now that the Security Manager is permanently disabled, the following > permission classes in the core libraries area can be deprecated for removal > as they are no longer useful: FilePermission, LinkPermission, > LoggingPermission, PropertyPermission, ReflectPermission, RuntimePermission, > a

Re: RFR: 8352895: UserCookie.java runs wrong test class

2025-04-07 Thread Jaikiran Pai
On Mon, 7 Apr 2025 07:00:14 GMT, Jaikiran Pai wrote: > Can I please get a review of this trivial test-only change which fixes the > test definition to run the correct test class? This addresses > https://bugs.openjdk.org/browse/JDK-8352895. > > The test code can be cleaned up a lot more. In fa

Integrated: 8352895: UserCookie.java runs wrong test class

2025-04-07 Thread Jaikiran Pai
On Mon, 7 Apr 2025 07:00:14 GMT, Jaikiran Pai wrote: > Can I please get a review of this trivial test-only change which fixes the > test definition to run the correct test class? This addresses > https://bugs.openjdk.org/browse/JDK-8352895. > > The test code can be cleaned up a lot more. In fa

Re: RFR: 8353641: Deprecate core library permission classes for removal [v8]

2025-04-07 Thread Alan Bateman
On Mon, 7 Apr 2025 18:40:35 GMT, Roger Riggs wrote: >> Now that the Security Manager is permanently disabled, the following >> permission classes in the core libraries area can be deprecated for removal >> as they are no longer useful: FilePermission, LinkPermission, >> LoggingPermission, Prop

Re: RFR: 8353698: Output of Simple Web Server is garbled if the console's encoding is not UTF-8 [v3]

2025-04-07 Thread Daniel Fuchs
On Fri, 4 Apr 2025 09:13:30 GMT, Daishi Tabata wrote: >> The output `jwebserver` and `java -m jdk.httpserver` uses UTF-8 encoding. >> Therefore, if the console encoding is not set to UTF-8 (for example, MS932 >> on Japanese Windows), garbled characters may appear.  >> Since System.out knows the

Re: RFR: 8350279: HttpClient: Add a new HttpResponse method to identify connections [v11]

2025-04-07 Thread Volkan Yazici
> Adds `HttpResponse::connectionLabel` method that provides an identifier for > the connection. > > **Implementation note:** The feature is facilitated by > `HttpConnection::label`, which should not be confused with > `HttpConnection::id`. This distinction is explained in the JavaDoc of both >

Re: RFR: 8350279: HttpClient: Add a new HttpResponse method to identify connections [v10]

2025-04-07 Thread Volkan Yazici
On Mon, 7 Apr 2025 09:08:17 GMT, Jaikiran Pai wrote: >> Volkan Yazici has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add -Djdk.httpclient.keepalive.timeout=120` to `@run` > > test/jdk/java/net/httpclient/HttpResponseConnectionLabelTest.

Re: RFR: 8353453: URLDecoder should use HexFormat

2025-04-07 Thread Daniel Fuchs
On Sat, 29 Mar 2025 17:27:20 GMT, Patrick Strawderman wrote: > Use `HexFormat.fromHexDigits` in URLDecoder, instead of `Integer.parseInt`. Tests came back green - a few unrelated failures. - PR Comment: https://git.openjdk.org/jdk/pull/24314#issuecomment-2782760557

Re: RFR: 8350279: HttpClient: Add a new HttpResponse method to identify connections [v10]

2025-04-07 Thread Jaikiran Pai
On Mon, 7 Apr 2025 08:27:38 GMT, Volkan Yazici wrote: >> Adds `HttpResponse::connectionLabel` method that provides an identifier for >> the connection. >> >> **Implementation note:** The feature is facilitated by >> `HttpConnection::label`, which should not be confused with >> `HttpConnection

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

2025-04-07 Thread Daniel Fuchs
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 > exchanges during shutdown >

Re: RFR: 8353698: Output of Simple Web Server is garbled if the console's encoding is not UTF-8 [v3]

2025-04-07 Thread Daishi Tabata
On Fri, 4 Apr 2025 09:13:30 GMT, Daishi Tabata wrote: >> The output `jwebserver` and `java -m jdk.httpserver` uses UTF-8 encoding. >> Therefore, if the console encoding is not set to UTF-8 (for example, MS932 >> on Japanese Windows), garbled characters may appear.  >> Since System.out knows the

Re: RFR: 8353698: Output of Simple Web Server is garbled if the console's encoding is not UTF-8 [v3]

2025-04-07 Thread duke
On Fri, 4 Apr 2025 09:13:30 GMT, Daishi Tabata wrote: >> The output `jwebserver` and `java -m jdk.httpserver` uses UTF-8 encoding. >> Therefore, if the console encoding is not set to UTF-8 (for example, MS932 >> on Japanese Windows), garbled characters may appear.  >> Since System.out knows the

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

2025-04-07 Thread Daniel Fuchs
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 > exchanges during shutdown >

Re: RFR: 8350279: HttpClient: Add a new HttpResponse method to identify connections [v4]

2025-04-07 Thread Jaikiran Pai
On Fri, 4 Apr 2025 13:10:56 GMT, Volkan Yazici wrote: >> @jaikiran, what you're suggesting makes sense. I'm still exploring the >> interplay between the connection label and HTTP/3 server pushes. I will >> return back to your suggestion soon. > >> In this proposed form, no two connections in tw

Re: RFR: 8353698: Output of Simple Web Server is garbled if the console's encoding is not UTF-8 [v3]

2025-04-07 Thread Daniel Fuchs
On Mon, 7 Apr 2025 06:11:30 GMT, Alan Bateman wrote: >> Daishi Tabata has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update full name > > src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/JWebServer.java > line 66: > >>

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

2025-04-07 Thread Daniel Fuchs
On Mon, 7 Apr 2025 13:26:45 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, Section 2. >> >> This PR: >> >> * Moves `URLJarFi

Re: RFR: 8353453: URLDecoder should use HexFormat

2025-04-07 Thread Jaikiran Pai
On Sat, 29 Mar 2025 17:27:20 GMT, Patrick Strawderman wrote: > Use `HexFormat.fromHexDigits` in URLDecoder, instead of `Integer.parseInt`. I would have preferred for the catch block to be changed to catch `IllegalArgumentException` instead of the current `NumberFormatException`, to closely ali

Re: RFR: 8350279: HttpClient: Add a new HttpResponse method to identify connections [v6]

2025-04-07 Thread Volkan Yazici
On Fri, 4 Apr 2025 15:01:48 GMT, Jaikiran Pai wrote: >> Volkan Yazici has updated the pull request incrementally with five >> additional commits since the last revision: >> >> - Remove timeout from `CountDownLatch::await` calls >> - Replace `@AutoClose` with a corresponding `@AfterEach` metho

Re: RFR: 8350279: HttpClient: Add a new HttpResponse method to identify connections [v7]

2025-04-07 Thread Jaikiran Pai
On Mon, 7 Apr 2025 07:43:28 GMT, Volkan Yazici wrote: >> Adds `HttpResponse::connectionLabel` method that provides an identifier for >> the connection. >> >> **Implementation note:** The feature is facilitated by >> `HttpConnection::label`, which should not be confused with >> `HttpConnection

Re: RFR: 8350279: HttpClient: Add a new HttpResponse method to identify connections [v6]

2025-04-07 Thread Jaikiran Pai
On Mon, 7 Apr 2025 07:40:13 GMT, Volkan Yazici wrote: >> Yes, I think othervm would be fine. In fact, I was adding a review comment >> in another context, where I suspect we might be forced to use the othervm >> mode anyway. > > Switched to `othervm` in cc70d926dbc867ecf8f3390c76ccb02888c8e8d8.

Re: RFR: 8350279: HttpClient: Add a new HttpResponse method to identify connections [v7]

2025-04-07 Thread Volkan Yazici
> Adds `HttpResponse::connectionLabel` method that provides an identifier for > the connection. > > **Implementation note:** The feature is facilitated by > `HttpConnection::label`, which should not be confused with > `HttpConnection::id`. This distinction is explained in the JavaDoc of both >

Re: RFR: 8350279: HttpClient: Add a new HttpResponse method to identify connections [v6]

2025-04-07 Thread Volkan Yazici
On Fri, 4 Apr 2025 15:03:32 GMT, Jaikiran Pai wrote: >> Another possibility is to run in /othervm mode - then we don't care... > > Yes, I think othervm would be fine. In fact, I was adding a review comment in > another context, where I suspect we might be forced to use the othervm mode > anyway

Re: RFR: 8350279: HttpClient: Add a new HttpResponse method to identify connections [v6]

2025-04-07 Thread Volkan Yazici
On Fri, 4 Apr 2025 15:02:21 GMT, Jaikiran Pai wrote: >> Volkan Yazici has updated the pull request incrementally with five >> additional commits since the last revision: >> >> - Remove timeout from `CountDownLatch::await` calls >> - Replace `@AutoClose` with a corresponding `@AfterEach` metho

Re: RFR: 8350279: HttpClient: Add a new HttpResponse method to identify connections [v8]

2025-04-07 Thread Volkan Yazici
> Adds `HttpResponse::connectionLabel` method that provides an identifier for > the connection. > > **Implementation note:** The feature is facilitated by > `HttpConnection::label`, which should not be confused with > `HttpConnection::id`. This distinction is explained in the JavaDoc of both >

Re: RFR: 8350279: HttpClient: Add a new HttpResponse method to identify connections [v9]

2025-04-07 Thread Volkan Yazici
> Adds `HttpResponse::connectionLabel` method that provides an identifier for > the connection. > > **Implementation note:** The feature is facilitated by > `HttpConnection::label`, which should not be confused with > `HttpConnection::id`. This distinction is explained in the JavaDoc of both >

Re: RFR: 8350279: HttpClient: Add a new HttpResponse method to identify connections [v7]

2025-04-07 Thread Volkan Yazici
On Mon, 7 Apr 2025 07:43:28 GMT, Jaikiran Pai wrote: >> Volkan Yazici has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Use `othervm` in `@run` > > test/jdk/java/net/httpclient/HttpResponseConnectionLabelTest.java line 35: > >> 33: >> 34

Re: RFR: 8350279: HttpClient: Add a new HttpResponse method to identify connections [v10]

2025-04-07 Thread Volkan Yazici
> Adds `HttpResponse::connectionLabel` method that provides an identifier for > the connection. > > **Implementation note:** The feature is facilitated by > `HttpConnection::label`, which should not be confused with > `HttpConnection::id`. This distinction is explained in the JavaDoc of both >

Re: RFR: 8350279: HttpClient: Add a new HttpResponse method to identify connections [v6]

2025-04-07 Thread Volkan Yazici
On Fri, 4 Apr 2025 16:41:35 GMT, Daniel Fuchs wrote: >> Waiting for the test to fail due to this reason and then adjusting the >> timeout is fine with me. > > On the plus side - if we add the `-Djdk.httpclient.keepalive.timeout=120` now > we might not have to deal with it later, and maybe it wi

Re: RFR: 8350279: HttpClient: Add a new HttpResponse method to identify connections [v11]

2025-04-07 Thread Jaikiran Pai
On Mon, 7 Apr 2025 09:31:47 GMT, Volkan Yazici wrote: >> Adds `HttpResponse::connectionLabel` method that provides an identifier for >> the connection. >> >> **Implementation note:** The feature is facilitated by >> `HttpConnection::label`, which should not be confused with >> `HttpConnection

Re: RFR: 8352895: UserCookie.java runs wrong test class

2025-04-07 Thread Daniel Fuchs
On Mon, 7 Apr 2025 07:00:14 GMT, Jaikiran Pai wrote: > Can I please get a review of this trivial test-only change which fixes the > test definition to run the correct test class? This addresses > https://bugs.openjdk.org/browse/JDK-8352895. > > The test code can be cleaned up a lot more. In fa

Re: RFR: 8353698: Output of Simple Web Server is garbled if the console's encoding is not UTF-8 [v3]

2025-04-07 Thread Alan Bateman
On Mon, 7 Apr 2025 09:25:08 GMT, Daniel Fuchs wrote: >> src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/JWebServer.java >> line 66: >> >>> 64: setMaxConnectionsIfNotSet(); >>> 65: >>> 66: int ec = SimpleFileServerImpl.start(new PrintWriter(System.out, >>> true

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, Section 2. > > This PR: > > * Moves `URLJarFile.isF

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

2025-04-07 Thread Jaikiran Pai
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, Section 2. > > This PR: > > * Moves `URLJarFile.isF

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

2025-04-07 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 > document

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: 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