Integrated: 8297211: Expensive fillInStackTrace operation in HttpURLConnection.getOutputStream0 when no content-length in response

2022-11-21 Thread Jaikiran Pai
On Mon, 21 Nov 2022 06:47:52 GMT, Jaikiran Pai wrote: > Can I please get a review for this small change which addresses > https://bugs.openjdk.org/browse/JDK-8297211? > The change checks if the `content-length` header value is present before > parsing it into a `Long` value. The commit also no

Re: RFR: 8297211: Expensive fillInStackTrace operation in HttpURLConnection.getOutputStream0 when no content-length in response [v3]

2022-11-21 Thread Jaikiran Pai
On Mon, 21 Nov 2022 13:36:15 GMT, Jaikiran Pai wrote: >> Can I please get a review for this small change which addresses >> https://bugs.openjdk.org/browse/JDK-8297211? >> The change checks if the `content-length` header value is present before >> parsing it into a `Long` value. The commit als

Integrated: JDK-8297164: Update troff man pages and CheckManPageOptions.java

2022-11-21 Thread Jonathan Gibbons
On Thu, 17 Nov 2022 22:23:53 GMT, Jonathan Gibbons wrote: > Please review an update for the troff man pages, following the recent update > to upgrade to use pandoc 2.19.2 > (See https://bugs.openjdk.org/browse/JDK-8297165) > > In conjunction with this, one javadoc test also needs to be updated,

Re: RFR: 8223783: sun/net/www/http/HttpClient/MultiThreadTest.java sometimes detect threads+1 connections

2022-11-21 Thread Andrey Turbanov
On Mon, 21 Nov 2022 15:12:02 GMT, Daniel Fuchs wrote: > Please find here a test fix for the > sun/net/www/http/HttpClient/MultiThreadTest. > > This test makes concurrent connections to a server using multiple threads, > and due to keep-alive, expects that there should not be more connections t

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v4]

2022-11-21 Thread Alan Bateman
On Mon, 21 Nov 2022 17:00:52 GMT, Maurizio Cimadamore wrote: >>> Although this looks much simpler and concise, it means "a new object is >>> created for each invocation" >> >> My comment was actually to see if DirectBuffer could extend AutoCloseable so >> that the acquire returns "this" for

Re: RFR: JDK-8297164: Update troff man pages and CheckManPageOptions.java [v2]

2022-11-21 Thread Daniel Fuchs
On Mon, 21 Nov 2022 17:54:15 GMT, Jonathan Gibbons wrote: >> Please review an update for the troff man pages, following the recent update >> to upgrade to use pandoc 2.19.2 >> (See https://bugs.openjdk.org/browse/JDK-8297165) >> >> In conjunction with this, one javadoc test also needs to be upd

Re: RFR: JDK-8297164: Update troff man pages and CheckManPageOptions.java [v2]

2022-11-21 Thread Jonathan Gibbons
> Please review an update for the troff man pages, following the recent update > to upgrade to use pandoc 2.19.2 > (See https://bugs.openjdk.org/browse/JDK-8297165) > > In conjunction with this, one javadoc test also needs to be updated, to work > with the new form of output generated by the new

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v8]

2022-11-21 Thread Maurizio Cimadamore
On Mon, 21 Nov 2022 12:50:43 GMT, Per Minborg wrote: >> Would it be possible to re-examine acquireSession returning Runnable and >> acquireSessionAsAutoCloseable returning AutoCloseable. The naming is bit >> awkward at most of the use sites and maybe we can do better. > > I think it would be co

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v4]

2022-11-21 Thread Maurizio Cimadamore
On Mon, 21 Nov 2022 16:34:46 GMT, Alan Bateman wrote: > > Although this looks much simpler and concise, it means "a new object is > > created for each invocation" > > My comment was actually to see if DirectBuffer could extend AutoCloseable so > that the acquire returns "this" for the non-sess

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v4]

2022-11-21 Thread Alan Bateman
On Mon, 21 Nov 2022 16:08:20 GMT, Per Minborg wrote: > Although this looks much simpler and concise, it means "a new object is > created for each invocation" My comment was actually to see if DirectBuffer could extend AutoCloseable so that the acquire returns "this" for the non-session case.

Re: RFR: 8281236: (D)TLS key exchange named groups [v3]

2022-11-21 Thread Sean Mullan
On Tue, 8 Nov 2022 22:07:35 GMT, Sean Mullan wrote: >>> Unfortunately, I only have author status and can only comment. >> >> I think OpenJDK Author can approve as well. I just need to get another >> Reviewer approval before integration. > >> > Unfortunately, I only have author status and can o

Re: RFR: 8296804: Document HttpClient configuration properties in java.net.http module-info [v3]

2022-11-21 Thread Michael McMahon
On Mon, 21 Nov 2022 13:36:29 GMT, Daniel Fuchs wrote: >> Michael McMahon 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 three additional >> com

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v4]

2022-11-21 Thread Per Minborg
On Mon, 21 Nov 2022 14:07:38 GMT, Alan Bateman wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Rename methods > > src/java.base/share/classes/java/util/zip/Adler32.java line 105: > >> 103: adler = u

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v8]

2022-11-21 Thread Per Minborg
> This PR proposes the introduction of **guarding** of the use of > `DirectBuffer::address` within the JDK. With the introduction of the Foreign > Function and Memory access, it is possible to derive Buffer instances that > are backed by native memory that, in turn, can be closed asynchronously

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v6]

2022-11-21 Thread Per Minborg
On Mon, 21 Nov 2022 14:14:14 GMT, Alan Bateman wrote: >> Per Minborg has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Update src/java.base/share/classes/jdk/internal/access/JavaNioAccess.java >> >>Co-authored-by: ExE Boss <38890

Re: RFR: 8297211: Expensive fillInStackTrace operation in HttpURLConnection.getOutputStream0 when no content-length in response [v3]

2022-11-21 Thread Volker Simonis
On Mon, 21 Nov 2022 13:36:15 GMT, Jaikiran Pai wrote: >> Can I please get a review for this small change which addresses >> https://bugs.openjdk.org/browse/JDK-8297211? >> The change checks if the `content-length` header value is present before >> parsing it into a `Long` value. The commit als

RFR: 8223783: sun/net/www/http/HttpClient/MultiThreadTest.java sometimes detect threads+1 connections

2022-11-21 Thread Daniel Fuchs
Please find here a test fix for the sun/net/www/http/HttpClient/MultiThreadTest. This test makes concurrent connections to a server using multiple threads, and due to keep-alive, expects that there should not be more connections than concurrent threads. However, the test has been seen occasional

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v6]

2022-11-21 Thread Alan Bateman
On Mon, 21 Nov 2022 14:02:38 GMT, Per Minborg wrote: >> This PR proposes the introduction of **guarding** of the use of >> `DirectBuffer::address` within the JDK. With the introduction of the Foreign >> Function and Memory access, it is possible to derive Buffer instances that >> are backed by

Re: RFR: 8297211: Expensive fillInStackTrace operation in HttpURLConnection.getOutputStream0 when no content-length in response [v3]

2022-11-21 Thread Daniel Fuchs
On Mon, 21 Nov 2022 13:36:15 GMT, Jaikiran Pai wrote: >> Can I please get a review for this small change which addresses >> https://bugs.openjdk.org/browse/JDK-8297211? >> The change checks if the `content-length` header value is present before >> parsing it into a `Long` value. The commit als

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v4]

2022-11-21 Thread Alan Bateman
On Mon, 21 Nov 2022 13:02:48 GMT, Per Minborg wrote: >> This PR proposes the introduction of **guarding** of the use of >> `DirectBuffer::address` within the JDK. With the introduction of the Foreign >> Function and Memory access, it is possible to derive Buffer instances that >> are backed by

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v7]

2022-11-21 Thread Per Minborg
> This PR proposes the introduction of **guarding** of the use of > `DirectBuffer::address` within the JDK. With the introduction of the Foreign > Function and Memory access, it is possible to derive Buffer instances that > are backed by native memory that, in turn, can be closed asynchronously

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v6]

2022-11-21 Thread Per Minborg
> This PR proposes the introduction of **guarding** of the use of > `DirectBuffer::address` within the JDK. With the introduction of the Foreign > Function and Memory access, it is possible to derive Buffer instances that > are backed by native memory that, in turn, can be closed asynchronously

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v4]

2022-11-21 Thread ExE Boss
On Mon, 21 Nov 2022 13:43:56 GMT, Per Minborg wrote: >> src/java.base/share/classes/sun/nio/ch/DirectBuffer.java line 41: >> >>> 39: // An example of a guarded use of a memory address is shown here: >>> 40: // >>> 41: // try (var guard = NIO_ACCESS.acquireSessionAsAutoCloseable(bb))

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v4]

2022-11-21 Thread Per Minborg
On Mon, 21 Nov 2022 13:32:43 GMT, ExE Boss wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Rename methods > > src/java.base/share/classes/sun/nio/ch/DirectBuffer.java line 41: > >> 39: // An example of a guarde

Re: RFR: 8296804: Document HttpClient configuration properties in java.net.http module-info [v3]

2022-11-21 Thread Daniel Fuchs
On Mon, 21 Nov 2022 12:31:44 GMT, Michael McMahon wrote: >> Hi, >> >> Could I get the following doc change reviewed please? It documents the >> system/networking properties used by the java.net.http HTTP client in its >> module-info. (CSR to follow) >> >> Thanks, >> Michael > > Michael McMaho

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v5]

2022-11-21 Thread Per Minborg
> This PR proposes the introduction of **guarding** of the use of > `DirectBuffer::address` within the JDK. With the introduction of the Foreign > Function and Memory access, it is possible to derive Buffer instances that > are backed by native memory that, in turn, can be closed asynchronously

Re: RFR: 8297211: Expensive fillInStackTrace operation in HttpURLConnection.getOutputStream0 when no content-length in response [v2]

2022-11-21 Thread Jaikiran Pai
On Mon, 21 Nov 2022 12:49:20 GMT, Hannes Greule wrote: >> Jaikiran Pai has updated the pull request incrementally with one additional >> commit since the last revision: >> >> review suggestion - do a similar change in URLConnection > > src/java.base/share/classes/java/net/URLConnection.java l

Re: RFR: 8297211: Expensive fillInStackTrace operation in HttpURLConnection.getOutputStream0 when no content-length in response [v2]

2022-11-21 Thread Jaikiran Pai
On Mon, 21 Nov 2022 13:07:04 GMT, Volker Simonis wrote: > One final comment: could you please leave the empty catch blocks in one line Done. Updated the PR with this suggested format. Testing in progress to make sure there are no regressions from these changes. - PR: https://git.o

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v4]

2022-11-21 Thread ExE Boss
On Mon, 21 Nov 2022 13:02:48 GMT, Per Minborg wrote: >> This PR proposes the introduction of **guarding** of the use of >> `DirectBuffer::address` within the JDK. With the introduction of the Foreign >> Function and Memory access, it is possible to derive Buffer instances that >> are backed by

Re: RFR: 8297211: Expensive fillInStackTrace operation in HttpURLConnection.getOutputStream0 when no content-length in response [v3]

2022-11-21 Thread Jaikiran Pai
> Can I please get a review for this small change which addresses > https://bugs.openjdk.org/browse/JDK-8297211? > The change checks if the `content-length` header value is present before > parsing it into a `Long` value. The commit also now catches the more specific > `NumberFormatException` i

Re: RFR: 8297211: Expensive fillInStackTrace operation in HttpURLConnection.getOutputStream0 when no content-length in response [v2]

2022-11-21 Thread Volker Simonis
On Mon, 21 Nov 2022 11:17:27 GMT, Jaikiran Pai wrote: >> Can I please get a review for this small change which addresses >> https://bugs.openjdk.org/browse/JDK-8297211? >> The change checks if the `content-length` header value is present before >> parsing it into a `Long` value. The commit als

Re: RFR: 8297211: Expensive fillInStackTrace operation in HttpURLConnection.getOutputStream0 when no content-length in response [v2]

2022-11-21 Thread Evgeny Astigeevich
On Mon, 21 Nov 2022 12:49:20 GMT, Hannes Greule wrote: >> Jaikiran Pai has updated the pull request incrementally with one additional >> commit since the last revision: >> >> review suggestion - do a similar change in URLConnection > > src/java.base/share/classes/java/net/URLConnection.java l

Re: RFR: 8297211: Expensive fillInStackTrace operation in HttpURLConnection.getOutputStream0 when no content-length in response [v2]

2022-11-21 Thread Evgeny Astigeevich
On Mon, 21 Nov 2022 11:17:27 GMT, Jaikiran Pai wrote: >> Can I please get a review for this small change which addresses >> https://bugs.openjdk.org/browse/JDK-8297211? >> The change checks if the `content-length` header value is present before >> parsing it into a `Long` value. The commit als

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v4]

2022-11-21 Thread Per Minborg
> This PR proposes the introduction of **guarding** of the use of > `DirectBuffer::address` within the JDK. With the introduction of the Foreign > Function and Memory access, it is possible to derive Buffer instances that > are backed by native memory that, in turn, can be closed asynchronously

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v3]

2022-11-21 Thread Per Minborg
On Mon, 21 Nov 2022 12:19:21 GMT, Alan Bateman wrote: >> maybe just `bufferLock` and and just `acquireBuffer` ? > > Would it be possible to re-examine acquireSession returning Runnable and > acquireSessionAsAutoCloseable returning AutoCloseable. The naming is bit > awkward at most of the use si

Re: RFR: 8297211: Expensive fillInStackTrace operation in HttpURLConnection.getOutputStream0 when no content-length in response [v2]

2022-11-21 Thread Hannes Greule
On Mon, 21 Nov 2022 11:17:27 GMT, Jaikiran Pai wrote: >> Can I please get a review for this small change which addresses >> https://bugs.openjdk.org/browse/JDK-8297211? >> The change checks if the `content-length` header value is present before >> parsing it into a `Long` value. The commit als

Re: RFR: 8297211: Expensive fillInStackTrace operation in HttpURLConnection.getOutputStream0 when no content-length in response [v2]

2022-11-21 Thread Evgeny Astigeevich
On Mon, 21 Nov 2022 11:17:27 GMT, Jaikiran Pai wrote: >> Can I please get a review for this small change which addresses >> https://bugs.openjdk.org/browse/JDK-8297211? >> The change checks if the `content-length` header value is present before >> parsing it into a `Long` value. The commit als

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v3]

2022-11-21 Thread Per Minborg
> This PR proposes the introduction of **guarding** of the use of > `DirectBuffer::address` within the JDK. With the introduction of the Foreign > Function and Memory access, it is possible to derive Buffer instances that > are backed by native memory that, in turn, can be closed asynchronously

Re: RFR: 8296804: Document HttpClient configuration properties in java.net.http module-info [v3]

2022-11-21 Thread Michael McMahon
> Hi, > > Could I get the following doc change reviewed please? It documents the > system/networking properties used by the java.net.http HTTP client in its > module-info. (CSR to follow) > > Thanks, > Michael Michael McMahon has updated the pull request with a new target base due to a merge

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v2]

2022-11-21 Thread Maurizio Cimadamore
On Mon, 21 Nov 2022 12:03:35 GMT, Per Minborg wrote: >> src/java.base/share/classes/java/util/zip/Adler32.java line 102: >> >>> 100: return; >>> 101: if (buffer.isDirect()) { >>> 102: try (var sessionAcquisition = >>> NIO_ACCESS.acquireSessionAsAutoCloseable(buff

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v2]

2022-11-21 Thread Alan Bateman
On Mon, 21 Nov 2022 12:16:01 GMT, Maurizio Cimadamore wrote: >> Eventually, I hope most of them will be named `_`. > > maybe just `bufferLock` and and just `acquireBuffer` ? Would it be possible to re-examine acquireSession returning Runnable and acquireSessionAsAutoCloseable returning AutoClo

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v2]

2022-11-21 Thread Per Minborg
> This PR proposes the introduction of **guarding** of the use of > `DirectBuffer::address` within the JDK. With the introduction of the Foreign > Function and Memory access, it is possible to derive Buffer instances that > are backed by native memory that, in turn, can be closed asynchronously

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded

2022-11-21 Thread Alan Bateman
On Mon, 21 Nov 2022 11:36:44 GMT, Per Minborg wrote: >> src/java.base/share/classes/sun/nio/ch/NioSocketImpl.java line 252: >> >>> 250: try { >>> 251: // 'dst' is guaranteed not to be associated with a >>> closeable session. >>> 252: // Hence, there is no need fo

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded

2022-11-21 Thread Per Minborg
On Mon, 21 Nov 2022 11:32:35 GMT, Alan Bateman wrote: >> This PR proposes the introduction of **guarding** of the use of >> `DirectBuffer::address` within the JDK. With the introduction of the Foreign >> Function and Memory access, it is possible to derive Buffer instances that >> are backed b

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded

2022-11-21 Thread Per Minborg
On Mon, 21 Nov 2022 11:29:07 GMT, Alan Bateman wrote: >> This PR proposes the introduction of **guarding** of the use of >> `DirectBuffer::address` within the JDK. With the introduction of the Foreign >> Function and Memory access, it is possible to derive Buffer instances that >> are backed b

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded

2022-11-21 Thread Alan Bateman
On Mon, 21 Nov 2022 10:53:07 GMT, Per Minborg wrote: > This PR proposes the introduction of **guarding** of the use of > `DirectBuffer::address` within the JDK. With the introduction of the Foreign > Function and Memory access, it is possible to derive Buffer instances that > are backed by nat

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded

2022-11-21 Thread Alan Bateman
On Mon, 21 Nov 2022 10:53:07 GMT, Per Minborg wrote: > This PR proposes the introduction of **guarding** of the use of > `DirectBuffer::address` within the JDK. With the introduction of the Foreign > Function and Memory access, it is possible to derive Buffer instances that > are backed by nat

Re: RFR: 8297211: Expensive fillInStackTrace operation in HttpURLConnection.getOutputStream0 when no content-length in response

2022-11-21 Thread Jaikiran Pai
On Mon, 21 Nov 2022 06:47:52 GMT, Jaikiran Pai wrote: > Can I please get a review for this small change which addresses > https://bugs.openjdk.org/browse/JDK-8297211? > The change checks if the `content-length` header value is present before > parsing it into a `Long` value. The commit also no

Re: RFR: 8297211: Expensive fillInStackTrace operation in HttpURLConnection.getOutputStream0 when no content-length in response [v2]

2022-11-21 Thread Jaikiran Pai
> Can I please get a review for this small change which addresses > https://bugs.openjdk.org/browse/JDK-8297211? > The change checks if the `content-length` header value is present before > parsing it into a `Long` value. The commit also now catches the more specific > `NumberFormatException` i

RFR: 8296024: Usage of DIrectBuffer::address should be guarded

2022-11-21 Thread Per Minborg
This PR proposes the introduction of **guarding** of the use of `DirectBuffer::address` within the JDK. With the introduction of the Foreign Function and Memory access, it is possible to derive Buffer instances that are backed by native memory that, in turn, can be closed asynchronously by the u

Re: RFR: 8296804: Document HttpClient configuration properties in java.net.http module-info [v2]

2022-11-21 Thread Michael McMahon
> Hi, > > Could I get the following doc change reviewed please? It documents the > system/networking properties used by the java.net.http HTTP client in its > module-info. (CSR to follow) > > Thanks, > Michael Michael McMahon has updated the pull request incrementally with one additional comm

Re: RFR: 8297211: Expensive fillInStackTrace operation in HttpURLConnection.getOutputStream0 when no content-length in response

2022-11-21 Thread Volker Simonis
On Mon, 21 Nov 2022 06:47:52 GMT, Jaikiran Pai wrote: > Can I please get a review for this small change which addresses > https://bugs.openjdk.org/browse/JDK-8297211? > The change checks if the `content-length` header value is present before > parsing it into a `Long` value. The commit also no