Re: RFR: 8327989: java/net/httpclient/ManyRequest.java should not use "localhost" in URIs [v3]

2024-03-12 Thread Guoxiong Li
On Tue, 12 Mar 2024 19:05:23 GMT, Daniel Fuchs wrote: >> Please find here a trivial test fix that removes usage of "localhost" from >> ManyRequest.java. >> Use of "localhost" in test URIs is problematic as it leaves the test open to >> random failure when running on machines that have custom ma

Re: RFR: 8327796: Add method to java.net.http.HttpRequest to return a GET request in one call [v2]

2024-03-12 Thread Michael McMahon
On Tue, 12 Mar 2024 16:21:56 GMT, Daniel Fuchs wrote: >> src/java.net.http/share/classes/java/net/http/HttpResponse.java line 153: >> >>> 151: * @return an Optional containing the response body if the >>> predicate returns true >>> 152: */ >>> 153: public Optional bodyWhen(Predica

Re: RFR: 8327796: Add method to java.net.http.HttpRequest to return a GET request in one call [v4]

2024-03-12 Thread Michael McMahon
> Hi, > > This PR proposes to add simple utility method which returns a simple GET > HttpRequest in one call. The current builder pattern requires 4 (or 3 since > GET is the default method) method calls to achieve the same effect. > > Thanks, > Michael Michael McMahon has updated the pull requ

Re: RFR: 8327989: java/net/httpclient/ManyRequest.java should not use "localhost" in URIs [v3]

2024-03-12 Thread Daniel Jeliński
On Tue, 12 Mar 2024 19:03:01 GMT, Daniel Fuchs wrote: >> Please find here a trivial test fix that removes usage of "localhost" from >> ManyRequest.java. >> Use of "localhost" in test URIs is problematic as it leaves the test open to >> random failure when running on machines that have custom ma

Re: RFR: 8327989: java/net/httpclient/ManyRequest.java should not use "localhost" in URIs [v3]

2024-03-12 Thread Daniel Fuchs
> Please find here a trivial test fix that removes usage of "localhost" from > ManyRequest.java. > Use of "localhost" in test URIs is problematic as it leaves the test open to > random failure when running on machines that have custom mappings for > "localhost". The fix is to use the IP literal

Re: RFR: 8327989: java/net/httpclient/ManyRequest.java should not use "localhost" in URIs [v2]

2024-03-12 Thread Daniel Jeliński
On Tue, 12 Mar 2024 16:37:26 GMT, Daniel Fuchs wrote: >> Please find here a trivial test fix that removes usage of "localhost" from >> ManyRequest.java. >> Use of "localhost" in test URIs is problematic as it leaves the test open to >> random failure when running on machines that have custom ma

Integrated: 8327738: Remove unused internal method sun.n.w.p.h.HttpURLConnection.setDefaultAuthenticator

2024-03-12 Thread Eirik Bjørsnøs
On Sun, 10 Mar 2024 20:12:10 GMT, Eirik Bjørsnøs wrote: > Please review this cleanup PR which removes the internal, unused method > `sun.n.w.p.h.HttpURLConnection.setDefaultAuthenticator` with associated code. > > This was discovered while investigating methods annotated with `@Deprecated`, >

Re: RFR: 8327738: Remove unused internal method sun.n.w.p.h.HttpURLConnection.setDefaultAuthenticator [v2]

2024-03-12 Thread Eirik Bjørsnøs
On Mon, 11 Mar 2024 12:58:18 GMT, Eirik Bjørsnøs wrote: >> Please review this cleanup PR which removes the internal, unused method >> `sun.n.w.p.h.HttpURLConnection.setDefaultAuthenticator` with associated code. >> >> This was discovered while investigating methods annotated with >> `@Deprecat

Re: RFR: 8327989: java/net/httpclient/ManyRequest.java should not use "localhost" in URIs [v2]

2024-03-12 Thread Jaikiran Pai
On Tue, 12 Mar 2024 16:37:26 GMT, Daniel Fuchs wrote: >> Please find here a trivial test fix that removes usage of "localhost" from >> ManyRequest.java. >> Use of "localhost" in test URIs is problematic as it leaves the test open to >> random failure when running on machines that have custom ma

Re: RFR: 8327989: java/net/httpclient/ManyRequest.java should not use "localhost" in URIs [v2]

2024-03-12 Thread Daniel Fuchs
On Tue, 12 Mar 2024 16:30:34 GMT, Jaikiran Pai wrote: > The change looks good to me. The copyright year on the file would need an > update before integrating. Thanks Jaikiran. Done. - PR Comment: https://git.openjdk.org/jdk/pull/18239#issuecomment-1992086525

Re: RFR: 8327989: java/net/httpclient/ManyRequest.java should not use "localhost" in URIs [v2]

2024-03-12 Thread Daniel Fuchs
> Please find here a trivial test fix that removes usage of "localhost" from > ManyRequest.java. > Use of "localhost" in test URIs is problematic as it leaves the test open to > random failure when running on machines that have custom mappings for > "localhost". The fix is to use the IP literal

Re: RFR: 8327989: java/net/httpclient/ManyRequest.java should not use "localhost" in URIs

2024-03-12 Thread Jaikiran Pai
On Tue, 12 Mar 2024 15:21:27 GMT, Daniel Fuchs wrote: > Please find here a trivial test fix that removes usage of "localhost" from > ManyRequest.java. > Use of "localhost" in test URIs is problematic as it leaves the test open to > random failure when running on machines that have custom mappin

Re: RFR: 8327796: Add method to java.net.http.HttpRequest to return a GET request in one call [v2]

2024-03-12 Thread Daniel Fuchs
On Tue, 12 Mar 2024 16:18:15 GMT, Daniel Fuchs wrote: >> Michael McMahon has updated the pull request incrementally with one >> additional commit since the last revision: >> >> update Daniel review > > src/java.net.http/share/classes/java/net/http/HttpResponse.java line 153: > >> 151: *

Re: RFR: 8327796: Add method to java.net.http.HttpRequest to return a GET request in one call [v3]

2024-03-12 Thread Michael McMahon
> Hi, > > This PR proposes to add simple utility method which returns a simple GET > HttpRequest in one call. The current builder pattern requires 4 (or 3 since > GET is the default method) method calls to achieve the same effect. > > Thanks, > Michael Michael McMahon has updated the pull requ

Re: RFR: 8327796: Add method to java.net.http.HttpRequest to return a GET request in one call [v2]

2024-03-12 Thread Daniel Fuchs
On Tue, 12 Mar 2024 16:15:31 GMT, Michael McMahon wrote: >> Hi, >> >> This PR proposes to add simple utility method which returns a simple GET >> HttpRequest in one call. The current builder pattern requires 4 (or 3 since >> GET is the default method) method calls to achieve the same effect. >

Re: RFR: 8327796: Add method to java.net.http.HttpRequest to return a GET request in one call [v2]

2024-03-12 Thread Michael McMahon
On Tue, 12 Mar 2024 14:43:03 GMT, Michael McMahon wrote: >> src/java.net.http/share/classes/java/net/http/HttpRequest.java line 91: >> >>> 89: * >>> 90: * HttpRequest request = HttpRequest.GET("https://www.foo.com/";); >>> 91: * String response = client.send(request, >>> BodyHandlers.ofS

Re: RFR: 8327796: Add method to java.net.http.HttpRequest to return a GET request in one call [v2]

2024-03-12 Thread Michael McMahon
> Hi, > > This PR proposes to add simple utility method which returns a simple GET > HttpRequest in one call. The current builder pattern requires 4 (or 3 since > GET is the default method) method calls to achieve the same effect. > > Thanks, > Michael Michael McMahon has updated the pull requ

Integrated: 8312444: Delete unused parameters and variables in SocketPermission

2024-03-12 Thread Korov
On Fri, 1 Mar 2024 17:35:35 GMT, Korov wrote: > Removing unused parameter `defval` in `SocketPermission.initEphemeralPorts`, > so the variable `PRIV_PORT_MAX` and `DEF_EPH_LOW` unused too. > > Removing unused parameter `cname` in `SocketPermission.authorizedIPv4` and > `SocketPermission.author

RFR: 8327989: java/net/httpclient/ManyRequest.java should not use "localhost" in URIs

2024-03-12 Thread Daniel Fuchs
Please find here a trivial test fix that remove usage of "localhost" from ManyRequest.java. Use of "localhost" in test URIs is problematic as it leaves the test open to random failure when running on machines that have custom mappings for "localhost". The fix is to use the IP literal of the loop

Re: RFR: 8327796: Add method to java.net.http.HttpRequest to return a GET request in one call

2024-03-12 Thread Michael McMahon
On Tue, 12 Mar 2024 13:04:17 GMT, Daniel Fuchs wrote: >> Hi, >> >> This PR proposes to add simple utility method which returns a simple GET >> HttpRequest in one call. The current builder pattern requires 4 (or 3 since >> GET is the default method) method calls to achieve the same effect. >>

Re: RFR: 8327796: Add method to java.net.http.HttpRequest to return a GET request in one call

2024-03-12 Thread Michael McMahon
On Tue, 12 Mar 2024 13:06:24 GMT, Daniel Fuchs wrote: > Did you mean "or if the URI string is otherwise invalid?" Yes, that is clearer. > Also we could add an `@spec` here to say the returned value is equivalent to > `HttpRequest.newBuilder(URI.create(uristring).GET().build()` Not sure that

Re: RFR: 8327796: Add method to java.net.http.HttpRequest to return a GET request in one call

2024-03-12 Thread Daniel Fuchs
On Tue, 12 Mar 2024 10:46:00 GMT, Michael McMahon wrote: > Hi, > > This PR proposes to add simple utility method which returns a simple GET > HttpRequest in one call. The current builder pattern requires 4 (or 3 since > GET is the default method) method calls to achieve the same effect. > > T

RFR: 8327796: Add method to java.net.http.HttpRequest to return a GET request in one call

2024-03-12 Thread Michael McMahon
Hi, This PR proposes to add simple utility method which returns a simple GET HttpRequest in one call. The current builder pattern requires 4 (or 3 since GET is the default method) method calls to achieve the same effect. Thanks, Michael - Commit messages: - Copyright - remove wh