Feature-Request: HttpResponse.BodyHandlers.ofReader or alternatively convenience function

2020-11-05 Thread Klaus Malorny
Hi, while the new HTTP client provides means to read text files as a single string or as a stream of lines, it actually does not provide any way to read the text via the Reader class. For many text types, the character encoding is not fixed by the format but may vary. Thus one cannot easily

Integrated: 8255584: `HttpPrincipal::getName` returns incorrect name

2020-11-05 Thread Patrick Concannon
On Fri, 30 Oct 2020 14:41:18 GMT, Patrick Concannon wrote: > Hi, > > Could someone please review my fix for JDK-8255584: '`HttpPrincipal::getName` > returns incorrect name' ? > The specification for `HttpPrincipal::getName` reports that it should return > the name of the HttpPrincipal in the

Re: RFR: 8252304: Seed an HttpRequest.Builder from an existing HttpRequest [v2]

2020-11-05 Thread Patrick Concannon
> Hi, > > Could someone please review our code for JDK-8252304: 'Seed an > HttpRequest.Builder from an existing HttpRequest'? > > This RFR proposes a new factory method for creating a new `HttpRequest` > builder from an existing `HttpRequest`. > This method can be used to build a new request eq

Re: RFR: 8255758: JEP 380 spec clarifications

2020-11-05 Thread Michael McMahon
On Tue, 3 Nov 2020 09:42:05 GMT, Daniel Fuchs wrote: >> I'm not sure, as the system properties don't affect implicit binding, but I >> would have liked to have a place to "explain" all aspects of binding of Unix >> domain sockets/server-sockets. Maybe, I could add a paragraph at the end, >> ju

Re: RFR: 8255758: JEP 380 spec clarifications

2020-11-05 Thread Michael McMahon
On Tue, 3 Nov 2020 09:09:18 GMT, Daniel Fuchs wrote: >> Minor spec changes from spec approved in initial CSR > > src/java.base/share/classes/java/net/doc-files/net-properties.html line 246: > >> 244: Unix domain sockets >> 245: There are a number of system (and networking) properties that affect

Re: RFR: 8255758: JEP 380 spec clarifications

2020-11-05 Thread Daniel Fuchs
On Tue, 3 Nov 2020 09:21:05 GMT, Michael McMahon wrote: >> src/java.base/share/classes/java/net/doc-files/net-properties.html line 246: >> >>> 244: Unix domain sockets >>> 245: There are a number of system (and networking) properties that >>> affect the behavior of >>> 246: channels to Unix dom

Re: RFR: 8255758: JEP 380 spec clarifications

2020-11-05 Thread Michael McMahon
On Tue, 3 Nov 2020 09:25:52 GMT, Michael McMahon wrote: >> src/java.base/share/classes/java/net/doc-files/net-properties.html line 250: >> >>> 248: Automatic binding of a server socket occurs when {@link >>> 249: java.nio.channels.ServerSocketChannel#bind(SocketAddress,int) >>> ServerSocketCha

RFR: 8255758: JEP 380 spec clarifications

2020-11-05 Thread Michael McMahon
Minor spec changes from spec approved in initial CSR - Commit messages: - update to net-properties.html - 8255758: JEP 380 spec clarifications Changes: https://git.openjdk.java.net/jdk/pull/1021/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1021&range=00 Issue: htt

Re: RFR: 8255758: JEP 380 spec clarifications

2020-11-05 Thread Daniel Fuchs
On Tue, 3 Nov 2020 09:29:54 GMT, Michael McMahon wrote: >> No, an empty path signifies an unnamed address and only client sockets >> (SocketChannels) are allowed to be unnamed. > > You get a BindException if you try to bind a ServerSocketChannel to the > unnamed address. But, the exception mess

Re: RFR: 8255758: JEP 380 spec clarifications

2020-11-05 Thread Daniel Fuchs
On Mon, 2 Nov 2020 22:04:56 GMT, Michael McMahon wrote: > Minor spec changes from spec approved in initial CSR Marked as reviewed by dfuchs (Reviewer). src/java.base/share/classes/java/net/doc-files/net-properties.html line 250: > 248: Automatic binding of a server socket occurs when {@link >

Re: RFR: 8253005: Add `@throws IOException` in javadoc for `HttpEchange.sendResponseHeaders` [v5]

2020-11-05 Thread Daniel Fuchs
On Wed, 4 Nov 2020 20:44:10 GMT, Patrick Concannon wrote: >> Hi, >> >> Could someone please review my fix for JDK-8253005: 'Add `@throws >> IOException` in javadoc for `HttpEchange.sendResponseHeaders`' ? >> >> The method `HttpEchange.sendResponseHeaders` throws an `IOException` but is >> un

RFR: 8246741: NetworkInterface/UniqueMacAddressesTest: mac address uniqueness test failed

2020-11-05 Thread Conor Cleary
The primary goal of this fix was to refactor NetworkInterface/UniqueMacAddressesTest.java to make use of the jdk.test.lib.NetworkConfiguration class instead of java.net.NetworkInterface. This was due to the original failure being related to the use of the 'awdl' interface on macOS, which should

Re: RFR: 8246741: NetworkInterface/UniqueMacAddressesTest: mac address uniqueness test failed

2020-11-05 Thread Chris Hegarty
On Thu, 5 Nov 2020 12:46:08 GMT, Conor Cleary wrote: > The primary goal of this fix was to refactor > NetworkInterface/UniqueMacAddressesTest.java to make use of the > jdk.test.lib.NetworkConfiguration class instead of java.net.NetworkInterface. > This was due to the original failure being rel

Re: RFR: 8246741: NetworkInterface/UniqueMacAddressesTest: mac address uniqueness test failed

2020-11-05 Thread Patrick Concannon
On Thu, 5 Nov 2020 13:59:18 GMT, Chris Hegarty wrote: >> The primary goal of this fix was to refactor >> NetworkInterface/UniqueMacAddressesTest.java to make use of the >> jdk.test.lib.NetworkConfiguration class instead of >> java.net.NetworkInterface. This was due to the original failure bein

Re: RFR: 8246741: NetworkInterface/UniqueMacAddressesTest: mac address uniqueness test failed

2020-11-05 Thread Conor Cleary
On Thu, 5 Nov 2020 14:10:15 GMT, Patrick Concannon wrote: > Great work, Conor. The test looks much better! > > Did you consider using testNG? Might help you condense things a bit more Thanks @pconcannon! I definitely do prefer testNG but was keen not to venture any further away from the scop

Re: RFR: 8246741: NetworkInterface/UniqueMacAddressesTest: mac address uniqueness test failed

2020-11-05 Thread Daniel Fuchs
On Thu, 5 Nov 2020 12:46:08 GMT, Conor Cleary wrote: > The primary goal of this fix was to refactor > NetworkInterface/UniqueMacAddressesTest.java to make use of the > jdk.test.lib.NetworkConfiguration class instead of java.net.NetworkInterface. > This was due to the original failure being rel

Re: RFR: 8246741: NetworkInterface/UniqueMacAddressesTest: mac address uniqueness test failed [v2]

2020-11-05 Thread Conor Cleary
> The primary goal of this fix was to refactor > NetworkInterface/UniqueMacAddressesTest.java to make use of the > jdk.test.lib.NetworkConfiguration class instead of java.net.NetworkInterface. > This was due to the original failure being related to the use of the 'awdl' > interface on macOS, wh

Re: RFR: 8252304: Seed an HttpRequest.Builder from an existing HttpRequest [v3]

2020-11-05 Thread Patrick Concannon
On Wed, 4 Nov 2020 15:42:54 GMT, Daniel Fuchs wrote: >> src/java.net.http/share/classes/java/net/http/HttpRequest.java line 344: >> >>> 342: throw ex; >>> 343: } catch (RuntimeException r) { >>> 344: throw new IllegalArgumentException("Illegal request >>> paramet

Re: RFR: 8252304: Seed an HttpRequest.Builder from an existing HttpRequest [v3]

2020-11-05 Thread Patrick Concannon
On Wed, 4 Nov 2020 15:04:35 GMT, Chris Hegarty wrote: >> Patrick Concannon 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 contains six additional >> com

Re: RFR: 8252304: Seed an HttpRequest.Builder from an existing HttpRequest [v3]

2020-11-05 Thread Patrick Concannon
> Hi, > > Could someone please review our code for JDK-8252304: 'Seed an > HttpRequest.Builder from an existing HttpRequest'? > > This RFR proposes a new factory method for creating a new `HttpRequest` > builder from an existing `HttpRequest`. > This method can be used to build a new request eq

Re: RFR: 8252304: Seed an HttpRequest.Builder from an existing HttpRequest [v3]

2020-11-05 Thread Patrick Concannon
On Wed, 4 Nov 2020 15:11:50 GMT, Daniel Fuchs wrote: >> Patrick Concannon 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 contains six additional >> comm

Re: RFR: 8246741: NetworkInterface/UniqueMacAddressesTest: mac address uniqueness test failed [v2]

2020-11-05 Thread Daniel Fuchs
On Thu, 5 Nov 2020 16:18:11 GMT, Conor Cleary wrote: >> The primary goal of this fix was to refactor >> NetworkInterface/UniqueMacAddressesTest.java to make use of the >> jdk.test.lib.NetworkConfiguration class instead of >> java.net.NetworkInterface. This was due to the original failure being

Re: RFR: 8252304: Seed an HttpRequest.Builder from an existing HttpRequest [v3]

2020-11-05 Thread Daniel Fuchs
On Thu, 5 Nov 2020 16:23:13 GMT, Patrick Concannon wrote: >> Hi, >> >> Could someone please review our code for JDK-8252304: 'Seed an >> HttpRequest.Builder from an existing HttpRequest'? >> >> This RFR proposes a new factory method for creating a new `HttpRequest` >> builder from an existin

Re: RFR: 8253005: Add `@throws IOException` in javadoc for `HttpEchange.sendResponseHeaders` [v6]

2020-11-05 Thread Patrick Concannon
> Hi, > > Could someone please review my fix for JDK-8253005: 'Add `@throws > IOException` in javadoc for `HttpEchange.sendResponseHeaders`' ? > > The method `HttpEchange.sendResponseHeaders` throws an `IOException` but is > unspecified in its javadoc. This fix adds an `@throws IOException` to

Re: RFR: 8246741: NetworkInterface/UniqueMacAddressesTest: mac address uniqueness test failed [v3]

2020-11-05 Thread Conor Cleary
> The primary goal of this fix was to refactor > NetworkInterface/UniqueMacAddressesTest.java to make use of the > jdk.test.lib.NetworkConfiguration class instead of java.net.NetworkInterface. > This was due to the original failure being related to the use of the 'awdl' > interface on macOS, wh

Re: RFR: 8246741: NetworkInterface/UniqueMacAddressesTest: mac address uniqueness test failed [v2]

2020-11-05 Thread Conor Cleary
On Thu, 5 Nov 2020 16:30:31 GMT, Daniel Fuchs wrote: >> Conor Cleary has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8246741: Corrected summary tag, moved record declaration > > test/jdk/java/net/NetworkInterface/UniqueMacAddressesTest.j

Re: RFR: 8253005: Add `@throws IOException` in javadoc for `HttpEchange.sendResponseHeaders` [v5]

2020-11-05 Thread Patrick Concannon
On Thu, 5 Nov 2020 10:52:19 GMT, Daniel Fuchs wrote: >> Patrick Concannon 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 contains eight additional >> co

Re: RFR: 8253005: Add `@throws IOException` in javadoc for `HttpEchange.sendResponseHeaders` [v7]

2020-11-05 Thread Patrick Concannon
> Hi, > > Could someone please review my fix for JDK-8253005: 'Add `@throws > IOException` in javadoc for `HttpEchange.sendResponseHeaders`' ? > > The method `HttpEchange.sendResponseHeaders` throws an `IOException` but is > unspecified in its javadoc. This fix adds an `@throws IOException` to

Re: RFR: 8246741: NetworkInterface/UniqueMacAddressesTest: mac address uniqueness test failed [v3]

2020-11-05 Thread Daniel Fuchs
On Thu, 5 Nov 2020 17:01:07 GMT, Conor Cleary wrote: >> The primary goal of this fix was to refactor >> NetworkInterface/UniqueMacAddressesTest.java to make use of the >> jdk.test.lib.NetworkConfiguration class instead of >> java.net.NetworkInterface. This was due to the original failure being

Re: RFR: 8253005: Add `@throws IOException` in javadoc for `HttpEchange.sendResponseHeaders` [v7]

2020-11-05 Thread Daniel Fuchs
On Thu, 5 Nov 2020 17:08:10 GMT, Patrick Concannon wrote: >> Hi, >> >> Could someone please review my fix for JDK-8253005: 'Add `@throws >> IOException` in javadoc for `HttpEchange.sendResponseHeaders`' ? >> >> The method `HttpEchange.sendResponseHeaders` throws an `IOException` but is >> un

Re: RFR: 8252304: Seed an HttpRequest.Builder from an existing HttpRequest [v3]

2020-11-05 Thread Chris Hegarty
On Thu, 5 Nov 2020 16:23:13 GMT, Patrick Concannon wrote: >> Hi, >> >> Could someone please review our code for JDK-8252304: 'Seed an >> HttpRequest.Builder from an existing HttpRequest'? >> >> This RFR proposes a new factory method for creating a new `HttpRequest` >> builder from an existin

Re: RFR: 8253005: Add `@throws IOException` in javadoc for `HttpEchange.sendResponseHeaders` [v7]

2020-11-05 Thread Chris Hegarty
On Thu, 5 Nov 2020 17:08:10 GMT, Patrick Concannon wrote: >> Hi, >> >> Could someone please review my fix for JDK-8253005: 'Add `@throws >> IOException` in javadoc for `HttpEchange.sendResponseHeaders`' ? >> >> The method `HttpEchange.sendResponseHeaders` throws an `IOException` but is >> un

Re: RFR: 8253005: Add `@throws IOException` in javadoc for `HttpEchange.sendResponseHeaders` [v7]

2020-11-05 Thread Daniel Fuchs
On Thu, 5 Nov 2020 17:35:09 GMT, Chris Hegarty wrote: >> Patrick Concannon has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8252304: Added read to TestHandler to ensure requestBody consumed before >> closing exchange > > test/jdk/java/ne