Re: RFR: 8288885: Introduce a jwebserver launcher utility in test library for jtreg tests

2022-06-22 Thread Alan Bateman
On Wed, 22 Jun 2022 06:09:39 GMT, Jaikiran Pai wrote: > Can I please get a review for this change which adds a utility to the JDK > test library to help launch the JWebServer? As noted in the JBS issue, this > utility does the necessary work to make sure when the `launch()` method > returns, t

Re: RFR: 8288885: Introduce a jwebserver launcher utility in test library for jtreg tests [v2]

2022-06-22 Thread Alan Bateman
On Wed, 22 Jun 2022 07:44:34 GMT, Jaikiran Pai wrote: >> Can I please get a review for this change which adds a utility to the JDK >> test library to help launch the JWebServer? As noted in the JBS issue, this >> utility does the necessary work to make sure when the `launch()` method >> return

Re: RFR: JDK-8286610: Add additional diagnostic output to java/net/DatagramSocket/InterruptibleDatagramSocket.java

2022-06-24 Thread Alan Bateman
On Fri, 24 Jun 2022 14:31:59 GMT, Bill Huang wrote: > Failure was observed on > java/net/DatagramSocket/InterruptibleDatagramSocket.java where data was > received unexpectedly ( > [JDK-8286607](https://bugs.openjdk.org/browse/JDK-8286607)). This failure > could be caused by interference from

Re: RFR: 8289617: Remove test/jdk/java/net/ServerSocket/ThreadStop.java

2022-07-04 Thread Alan Bateman
On Mon, 4 Jul 2022 13:03:46 GMT, Michael McMahon wrote: > Hi, > > Could I get the following small change reviewed please? > > It removes a test that calls Thread.stop() which is no longer required since > it was checking for > a bug in the old SocketImpl that has recently been replaced by the

Re: RFR: 8289768: Clean up unused code [v3]

2022-07-08 Thread Alan Bateman
On Fri, 8 Jul 2022 07:08:46 GMT, Daniel Jeliński wrote: >> This patch removes many unused variables and one unused label reported by >> the compilers when relevant warnings are enabled. >> >> The unused code was found by compiling after removing `unused` from the list >> of disabled warnings

Re: RFR: 8290300: Use standard String-joining tools where applicable

2022-07-15 Thread Alan Bateman
On Fri, 15 Jul 2022 12:03:13 GMT, Сергей Цыпанов wrote: > Simplify code with `String.join()` joptsimple is a 3rd party code so we probably don't want to change that. - PR: https://git.openjdk.org/jdk/pull/9513

Re: RFR: 8290349: IP_DONTFRAGMENT doesn't set DF bit in IPv4 header [v2]

2022-08-01 Thread Alan Bateman
On Mon, 1 Aug 2022 07:16:49 GMT, Daniel Jeliński wrote: >> This patch partially fixes the issue where IPv6 sockets were fragmenting >> outgoing IPv4 datagrams even when IP_DONTFRAGMENT flag was set. >> Specifically, it fixes the issue on Linux and Windows. As far as I could >> tell, the issue

Re: RFR: 8290349: IP_DONTFRAGMENT doesn't set DF bit in IPv4 header [v3]

2022-08-02 Thread Alan Bateman
On Mon, 1 Aug 2022 09:00:37 GMT, Daniel Jeliński wrote: >> This patch partially fixes the issue where IPv6 sockets were fragmenting >> outgoing IPv4 datagrams even when IP_DONTFRAGMENT flag was set. >> Specifically, it fixes the issue on Linux and Windows. As far as I could >> tell, the issue

Re: RFR: 8290349: IP_DONTFRAGMENT doesn't set DF bit in IPv4 header [v2]

2022-08-02 Thread Alan Bateman
On Mon, 1 Aug 2022 08:40:23 GMT, Daniel Jeliński wrote: > Passing a boolean matches what we're doing in `setIntOption0` and gets the > job done. At this moment I don't see where passing `family` would be useful. > Can we make that change when it's actually needed? Okay, we can change it when w

Re: RFR: 8290349: IP_DONTFRAGMENT doesn't set DF bit in IPv4 header [v4]

2022-08-03 Thread Alan Bateman
On Wed, 3 Aug 2022 09:43:44 GMT, Daniel Jeliński wrote: >> This patch partially fixes the issue where IPv6 sockets were fragmenting >> outgoing IPv4 datagrams even when IP_DONTFRAGMENT flag was set. >> Specifically, it fixes the issue on Linux and Windows. As far as I could >> tell, the issue

Re: Extended socket options and module layers

2022-08-06 Thread Alan Bateman
On 05/08/2022 20:43, Chris Hegarty wrote: : I'm not sure that there is anything that should (or could) be done about this - an SPI for extended options is not really viable or suitable. Our use of reflection really obfuscated the bug, but equally code that deals with the extended socket options

Re: RFR: 7113208: Incorrect javadoc on java.net.DatagramPacket.setLength() [v2]

2022-08-30 Thread Alan Bateman
On Fri, 26 Aug 2022 09:55:11 GMT, Jaikiran Pai wrote: >> Can I please get a review of this javadoc only change for >> `DatagramPacket#setLength()` method? This addresses >> https://bugs.openjdk.org/browse/JDK-7113208. >> >> I haven't create a CSR because the javadoc was already stating the cor

Re: RFR: 8293842: IPv6-only systems throws UnsupportedOperationException for several socket/TCP options

2022-09-15 Thread Alan Bateman
On Thu, 15 Sep 2022 07:25:04 GMT, Man Cao wrote: > Hi all, > > Could anyone review this bug fix for ipv6-only system? See > https://bugs.openjdk.org/browse/JDK-8293842 for detailed description of this > bug. > > Ideally, the `socket(PF_INET6, ...)` or `socket(PF_INET, ...)` call should > dep

Re: RFR: 8293842: IPv6-only systems throws UnsupportedOperationException for several socket/TCP options [v2]

2022-09-15 Thread Alan Bateman
On Thu, 15 Sep 2022 19:05:09 GMT, Man Cao wrote: >> Hi all, >> >> Could anyone review this bug fix for ipv6-only system? See >> https://bugs.openjdk.org/browse/JDK-8293842 for detailed description of this >> bug. >> >> Ideally, the `socket(PF_INET6, ...)` or `socket(PF_INET, ...)` call should

Re: RFR: 8293064: Remove unused NET_xxx functions

2022-09-20 Thread Alan Bateman
On Mon, 19 Sep 2022 18:34:22 GMT, Aleksei Efimov wrote: >> No tests were affected so this is purely a removal PR apart from updating >> copyright headers. >> I ran tests for Tier 1,2&3 and everything seems to be passing > > The changes looks good to me with few additional changes needed on Linux

Re: RFR: 8294321: Fix typos in files under test/jdk/java, test/jdk/jdk, test/jdk/jni

2022-09-25 Thread Alan Bateman
On Thu, 25 Aug 2022 15:35:53 GMT, Michael Ernst wrote: > 8294321: Fix typos in files under test/jdk/java, test/jdk/jdk, test/jdk/jni src/java.base/share/native/libzip/zlib/zlib.h line 756: > 754:If this is done, the old level and strategy will be applied to the > data > 755:compressed

RFR: 8294375: test/jdk/java/nio/channels/vthread/BlockingChannelOps.java is slow

2022-09-26 Thread Alan Bateman
BlockingChannelOps.java and BlockingSocketOps.java test virtual threads doing blocking I/O on channels and java.net sockets. BlockingChannelOps has 32 tests at this time and takes nearly 120s to run due to several tests that sleep to improve the chances that threads are are blocked. These sleep

Re: RFR: 8294375: test/jdk/java/nio/channels/vthread/BlockingChannelOps.java is slow

2022-09-27 Thread Alan Bateman
On Tue, 27 Sep 2022 11:50:16 GMT, Jaikiran Pai wrote: >> BlockingChannelOps.java and BlockingSocketOps.java test virtual threads >> doing blocking I/O on channels and java.net sockets. >> >> BlockingChannelOps has 32 tests at this time and takes nearly 120s to run >> due to several tests that

Re: RFR: 8294375: test/jdk/java/nio/channels/vthread/BlockingChannelOps.java is slow

2022-09-27 Thread Alan Bateman
On Tue, 27 Sep 2022 13:55:14 GMT, Roger Riggs wrote: >> test/jdk/java/net/vthread/BlockingSocketOps.java line 714: >> >>> 712: } >>> 713: >>> 714: static void readToEOF(InputStream in) throws IOException { >> >> just curious: isn't that just `in.readAllBytes()`? >> Oh - I see. You don'

Re: RFR: 8294375: test/jdk/java/nio/channels/vthread/BlockingChannelOps.java is slow [v2]

2022-09-27 Thread Alan Bateman
se too hard to test that socket writes block on that > platform. Alan Bateman 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 addit

Re: RFR: 8294375: test/jdk/java/nio/channels/vthread/BlockingChannelOps.java is slow [v2]

2022-09-28 Thread Alan Bateman
On Wed, 28 Sep 2022 09:45:39 GMT, Jaikiran Pai wrote: > Now that these tests complete fast, do you think we should now remove all the > `/timeout=300` from each of the test definitions? I'll have to check. The reason for /timeout on some of these tests is because most of the testing has been w

Re: RFR: 8294375: test/jdk/java/nio/channels/vthread/BlockingChannelOps.java is slow [v3]

2022-09-28 Thread Alan Bateman
se too hard to test that socket writes block on that > platform. Alan Bateman has updated the pull request incrementally with one additional commit since the last revision: Drop /timeout from run tags. Fix out of date comment - Changes: - all: https://git.openjdk.org/jdk/pul

Integrated: 8294375: test/jdk/java/nio/channels/vthread/BlockingChannelOps.java is slow

2022-09-28 Thread Alan Bateman
On Mon, 26 Sep 2022 15:35:28 GMT, Alan Bateman wrote: > BlockingChannelOps.java and BlockingSocketOps.java test virtual threads doing > blocking I/O on channels and java.net sockets. > > BlockingChannelOps has 32 tests at this time and takes nearly 120s to run due > to sev

Re: RFR: 8294610: java/net/vthread/HttpALot.java is slow on Linux

2022-09-30 Thread Alan Bateman
On Fri, 30 Sep 2022 09:10:05 GMT, Jaikiran Pai wrote: > Can I please get a review for this test-only change which proposes to improve > the test run duration of `java/net/vthread/HttpALot.java` test, on Linux? > This relates to https://bugs.openjdk.org/browse/JDK-8294610 > > Experiments have s

Re: RFR: 8294610: java/net/vthread/HttpALot.java is slow on Linux [v2]

2022-09-30 Thread Alan Bateman
On Fri, 30 Sep 2022 09:57:32 GMT, Jaikiran Pai wrote: >> Can I please get a review for this test-only change which proposes to >> improve the test run duration of `java/net/vthread/HttpALot.java` test, on >> Linux? This relates to https://bugs.openjdk.org/browse/JDK-8294610 >> >> Experiments h

Re: RFR: 8294610: java/net/vthread/HttpALot.java is slow on Linux [v3]

2022-09-30 Thread Alan Bateman
On Fri, 30 Sep 2022 10:20:50 GMT, Jaikiran Pai wrote: >> Can I please get a review for this test-only change which proposes to >> improve the test run duration of `java/net/vthread/HttpALot.java` test, on >> Linux? This relates to https://bugs.openjdk.org/browse/JDK-8294610 >> >> Experiments h

Re: RFR: 8294626: Improve URL protocol lower casing

2022-09-30 Thread Alan Bateman
On Fri, 30 Sep 2022 10:39:37 GMT, Claes Redestad wrote: > Move a simple utility method from `URL` to the shared `sun.net.util.URLUtil` > class, rename it for clarity and enhance it so that it returns the string > literal if the protocol matches one of the tested variants. This helps reduce > d

Re: RFR: 8294610: java/net/vthread/HttpALot.java is slow on Linux [v3]

2022-09-30 Thread Alan Bateman
On Fri, 30 Sep 2022 10:53:10 GMT, Mark Sheppard wrote: >> Jaikiran Pai has updated the pull request incrementally with one additional >> commit since the last revision: >> >> test comment review > > test/jdk/java/net/vthread/HttpALot.java line 26: > >> 24: /** >> 25: * @test >> 26: * @bug

Re: RFR: 8294626: Improve URL protocol lower casing

2022-09-30 Thread Alan Bateman
On Fri, 30 Sep 2022 11:06:40 GMT, Claes Redestad wrote: > `URLUtil` already exists, is used during bootstrap from non-java.net packages > and would profit from reusing this lower case method. Making the method in > `URL` public is a non-starter. I'd love having module-scoped visibility > modif

Re: RFR: 8294610: java/net/vthread/HttpALot.java is slow on Linux [v5]

2022-10-01 Thread Alan Bateman
On Sat, 1 Oct 2022 00:51:47 GMT, Jaikiran Pai wrote: > Tests for tier1, tier2, tier3 came back fine. I also verified on linux, > windows and macos that the duration of this test is now within 5 to 8 seconds > range. The test runs in test2. It's good that this issue was tracked down and the ex

RFR: 8293810: Remove granting of RuntimePermission("stopThread") from tests

2022-10-05 Thread Alan Bateman
This is a test only change to remove the granting of RuntimePermission("stopThread") from the tests. With Thread.stop changed to throw UOE it means there is nothing that requires this permission. - Commit messages: - Initial commit Changes: https://git.openjdk.org/jdk/pull/10577/f

Integrated: 8293810: Remove granting of RuntimePermission("stopThread") from tests

2022-10-06 Thread Alan Bateman
On Wed, 5 Oct 2022 15:01:15 GMT, Alan Bateman wrote: > This is a test only change to remove the granting of > RuntimePermission("stopThread") from the tests. With Thread.stop changed to > throw UOE it means there is nothing that requires this permission. This pull r

Re: RFR: 8293590: Some syntax checks performed by URL.openConnection() could be performed earlier, at URL construction [v3]

2022-10-07 Thread Alan Bateman
On Thu, 6 Oct 2022 15:10:18 GMT, Daniel Fuchs wrote: >> Many built-in URL Handlers perform additional syntax checking on the URL >> when `URLStreamHandler::openConnection` / connect is called. In some cases, >> some of these checks could be also performed earlier, when >> `URLStreamHandler::pa

Re: RFR: 8293590: Some syntax checks performed by URL.openConnection() could be performed earlier, at URL construction [v3]

2022-10-07 Thread Alan Bateman
On Thu, 6 Oct 2022 15:10:18 GMT, Daniel Fuchs wrote: >> Many built-in URL Handlers perform additional syntax checking on the URL >> when `URLStreamHandler::openConnection` / connect is called. In some cases, >> some of these checks could be also performed earlier, when >> `URLStreamHandler::pa

Re: RFR: 8293590: Some syntax checks performed by URL.openConnection() could be performed earlier, at URL construction [v3]

2022-10-07 Thread Alan Bateman
On Thu, 6 Oct 2022 15:10:18 GMT, Daniel Fuchs wrote: >> Many built-in URL Handlers perform additional syntax checking on the URL >> when `URLStreamHandler::openConnection` / connect is called. In some cases, >> some of these checks could be also performed earlier, when >> `URLStreamHandler::pa

Re: RFR: 8293590: Some syntax checks performed by URL.openConnection() could be performed earlier, at URL construction [v3]

2022-10-07 Thread Alan Bateman
On Fri, 7 Oct 2022 08:42:43 GMT, Alan Bateman wrote: >> Daniel Fuchs 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: 8294321: Fix typos in files under test/jdk/java, test/jdk/jdk, test/jdk/jni [v2]

2022-10-07 Thread Alan Bateman
On Mon, 26 Sep 2022 16:51:36 GMT, Michael Ernst wrote: >> 8294321: Fix typos in files under test/jdk/java, test/jdk/jdk, test/jdk/jni > > Michael Ernst has updated the pull request with a new target base due to a > merge or a rebase. The pull request now contains six commits: > > - Reinstate t

Re: RFR: 8294948: Document IllegalArgumentException and NullPointerException thrown by URLStreamHandler::parseURL and URLStreamHandler::setURL [v7]

2022-10-16 Thread Alan Bateman
On Tue, 11 Oct 2022 14:17:31 GMT, Daniel Fuchs wrote: >> During the review of JDK-8293590, it was noted that some methods in >> `URLStreamHandler` were missing an `@throws IllegalArgumentException` clause >> in their API documentation. >> >> This change adds the requested information, and als

Re: RFR: 8294948: Document IllegalArgumentException and NullPointerException thrown by URLStreamHandler::parseURL and URLStreamHandler::setURL [v8]

2022-10-19 Thread Alan Bateman
On Tue, 18 Oct 2022 11:56:17 GMT, Daniel Fuchs wrote: >> During the review of JDK-8293590, it was noted that some methods in >> `URLStreamHandler` were missing an `@throws IllegalArgumentException` clause >> in their API documentation. >> >> This change adds the requested information, and als

Re: RFR: 8294948: Document IllegalArgumentException and NullPointerException thrown by URLStreamHandler::parseURL and URLStreamHandler::setURL [v8]

2022-10-19 Thread Alan Bateman
On Wed, 19 Oct 2022 12:13:44 GMT, Daniel Fuchs wrote: >> src/java.base/share/classes/java/net/URL.java line 580: >> >>> 578: * @implSpec Parsing the URL involves calling the {@link >>> 579: * URLStreamHandler#parseURL(URL, String, int, int) parseURL} >>> method on the >>> 580: *

Re: RFR: 8295470: Update openjdk.java.net => openjdk.org URLs in test code

2022-10-19 Thread Alan Bateman
On Tue, 18 Oct 2022 11:55:06 GMT, Magnus Ihse Bursie wrote: > This is a continuation of the effort to update all our URLs to the new > top-level domain. > > This patch updates (most) URLs in testing code. There still exists references > to openjdk.java.net, but that are not strictly used as no

Re: RFR: 8294948: Document IllegalArgumentException and NullPointerException thrown by URLStreamHandler::parseURL and URLStreamHandler::setURL [v9]

2022-10-19 Thread Alan Bateman
On Wed, 19 Oct 2022 13:57:52 GMT, Daniel Fuchs wrote: >> During the review of JDK-8293590, it was noted that some methods in >> `URLStreamHandler` were missing an `@throws IllegalArgumentException` clause >> in their API documentation. >> >> This change adds the requested information, and als

Re: RFR: 8295792: Clean up old async close code

2022-10-21 Thread Alan Bateman
On Fri, 21 Oct 2022 14:28:02 GMT, Daniel Jeliński wrote: > Please review this PR that removes the remains of old fdTable-based socket > close synchronization. > > Verified that tier1-3 tests continue to pass on Linux, MacOS and Windows. Did > not verify AIX. > > Also removed one slow test for

Re: RFR: 8295792: Clean up old async close code

2022-10-21 Thread Alan Bateman
On Fri, 21 Oct 2022 17:08:07 GMT, Daniel Jeliński wrote: >> src/java.base/unix/native/libnet/net_util_md.c line 703: >> >>> 701: >>> 702: errno = 0; >>> 703: read_rv = poll(&pfd, 1, nanoTimeout / NET_NSEC_PER_MSEC); >> >> I suspect this one will need to handle EINTR like the or

Re: RFR: 8295792: Clean up old async close code

2022-10-21 Thread Alan Bateman
On Fri, 21 Oct 2022 14:28:02 GMT, Daniel Jeliński wrote: > Please review this PR that removes the remains of old fdTable-based socket > close synchronization. > > Verified that tier1-3 tests continue to pass on Linux, MacOS and Windows. Did > not verify AIX. > > Also removed one slow test for

Re: RFR: 8294241: Deprecate URL public constructors

2022-10-26 Thread Alan Bateman
On 26/10/2022 23:53, Peter Firmstone wrote: The change will have some performance impact, by requiring redundant parsing. Just thought I'd mention it, in case it hasn't been thought of. If you do an internet search there are other implementations of RFC3986 in java also. https://github.com/

Re: RFR: 8294241: Deprecate URL public constructors [v2]

2022-10-29 Thread Alan Bateman
On Fri, 28 Oct 2022 14:54:26 GMT, Daniel Fuchs wrote: >> Deprecate URL constructors. Developers are encouraged to use `java.net.URI` >> to parse or construct any URL. >> >> The `java.net.URL` class does not itself encode or decode any URL components >> according to the escaping mechanism defin

Re: RFR: 8294241: Deprecate URL public constructors [v2]

2022-10-31 Thread Alan Bateman
On Mon, 31 Oct 2022 22:00:01 GMT, Phil Race wrote: > You have jumped through some refactoring hoops to be able to apply the > deprecation suppression to as little code as possible .. having made such > changes, then why didn't you just make the recommended change instead ? > > Should I presume

Re: RFR: 8294241: Deprecate URL public constructors [v2]

2022-11-01 Thread Alan Bateman
On Tue, 1 Nov 2022 14:22:18 GMT, Daniel Fuchs wrote: >> To be discussed: I actually wanted the deprecation link ( the link from >> `@deprecated` ) to lead here because I find that the whole section is >> relevant for developers who might want to decide whether to actually move >> away from usi

Re: RFR: 8294241: Deprecate URL public constructors [v3]

2022-11-02 Thread Alan Bateman
On Tue, 1 Nov 2022 16:14:20 GMT, Daniel Fuchs wrote: >> Deprecate URL constructors. Developers are encouraged to use `java.net.URI` >> to parse or construct any URL. >> >> The `java.net.URL` class does not itself encode or decode any URL components >> according to the escaping mechanism define

Re: RFR: 8296615: use of undeclared identifier 'IPV6_DONTFRAG'

2022-11-08 Thread Alan Bateman
On Tue, 8 Nov 2022 22:28:07 GMT, Xue-Lei Andrew Fan wrote: > Hi, > > May I have this update in jdk.net reviewed? > > While build on MacOX, I run into the following issues: Which macOS release and Xcode version is this, just wondering why it hasn't been seen before now. - PR: htt

Re: RFR: JDK-8296547: Add @spec tags to API

2022-11-10 Thread Alan Bateman
On Thu, 10 Nov 2022 11:30:51 GMT, Daniel Fuchs wrote: > When referencing an RFC, it might be good to keep the RFC number in the text > link. For instance I see that java.net.URL now has this: I agree and also to add that some RFCs have commas in their titles, the same separator used when there

Re: RFR: JDK-8296547: Add @spec tags to API

2022-11-10 Thread Alan Bateman
On Thu, 10 Nov 2022 01:10:13 GMT, Jonathan Gibbons wrote: > Please review a "somewhat automated" change to insert `@spec` tags into doc > comments, as appropriate, to leverage the recent new javadoc feature to > generate a new page listing the references to all external specifications > listed

Re: RFR: 8297132: BACKOUT JDK-8296889: Race condition when cancelling a request

2022-11-16 Thread Alan Bateman
On Wed, 16 Nov 2022 12:16:47 GMT, Daniel Fuchs wrote: > This fix for [JDK-8296889](https://bugs.openjdk.org/browse/JDK-8296889) is > causing trouble with the CancelStreamedBodyTest. Let's back it out until a > better solution is found. Marked as reviewed by alanb (Reviewer). - PR

Re: RFR: JDK-8297215: Update libs tests to use @enablePreview

2022-11-18 Thread Alan Bateman
On Thu, 17 Nov 2022 21:48:11 GMT, Joe Darcy wrote: > Similar to an update recently done for langtools tests, update the libraries > regression tests to take advantage of the @enablePreview jtreg feature. test/jdk/java/lang/Thread/BuilderTest.java line 29: > 27: * @enablePreview > 28: * @comp

Re: RFR: JDK-8297215: Update libs tests to use @enablePreview [v2]

2022-11-18 Thread Alan Bateman
On Fri, 18 Nov 2022 18:38:46 GMT, Joe Darcy wrote: >> test/jdk/java/lang/Thread/BuilderTest.java line 29: >> >>> 27: * @enablePreview >>> 28: * @compile BuilderTest.java >>> 29: * @run testng/othervm BuilderTest >> >> I assume `@compile` can be dropped from most of these tests now. Also I >

Re: RFR: JDK-8297215: Update libs tests to use @enablePreview [v2]

2022-11-19 Thread Alan Bateman
On Fri, 18 Nov 2022 21:29:50 GMT, Joe Darcy wrote: >> `@enablePreview` wasn't available when most of these tests were initially >> created. I changed some of to use this tag as part of other changes but >> didn't cover over the remaining tests that still use `@compile >> --enable-preview -sour

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: 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 [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 [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 [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: 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: 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: 8296024: Usage of DIrectBuffer::address should be guarded [v6]

2022-11-22 Thread Alan Bateman
On Mon, 21 Nov 2022 15:29:11 GMT, Per Minborg wrote: > That is clear to me but I am trying to prevent future redundant guarding. > Anyway, I will remove the comments. The faraway use sites look much better now. The performance sensitive usages need close attention. Can you summarise the change

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

2022-11-22 Thread Alan Bateman
On Tue, 22 Nov 2022 09:29:14 GMT, Maurizio Cimadamore wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Rework Acquisition > > src/java.base/share/classes/java/nio/Buffer.java line 827: > >> 825: >> 826:

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

2022-11-22 Thread Alan Bateman
On Tue, 22 Nov 2022 09:38:35 GMT, Maurizio Cimadamore wrote: >> src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpMultiChannelImpl.java line 590: >> >>> 588: int pos) >>> 589: throws IOException { >>> 590: try (var guard = NIO_ACCESS.acqui

Re: RFR: 8296546: Add @spec tags to API [v3]

2022-11-24 Thread Alan Bateman
On Wed, 23 Nov 2022 18:57:03 GMT, Jonathan Gibbons wrote: >> Please review a "somewhat automated" change to insert `@spec` tags into doc >> comments, as appropriate, to leverage the recent new javadoc feature to >> generate a new page listing the references to all external specifications >> li

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

2022-11-24 Thread Alan Bateman
On Thu, 24 Nov 2022 11:42:52 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 [v13]

2022-11-24 Thread Alan Bateman
On Fri, 25 Nov 2022 06:46:52 GMT, ExE Boss wrote: > I believe `UnsupportedOperationException` would be better for this. It would but Per is right that this it is throwing ISE today, it's just that the PR adds an explicit check and that highlights that the wrong exception is thrown. Buffers tha

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

2022-11-27 Thread Alan Bateman
On Thu, 24 Nov 2022 16:21:42 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 [v14]

2022-11-27 Thread Alan Bateman
On Thu, 24 Nov 2022 16:21:42 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: 8294321: Fix typos in files under test/jdk/java, test/jdk/jdk, test/jdk/jni

2022-11-28 Thread Alan Bateman
On Mon, 28 Nov 2022 08:58:29 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which fixes the typos in the test > packages? @mernst submitted this as a separate PR > https://github.com/openjdk/jdk/pull/10029 but given the number of areas and > files that other PR touches, th

Re: RFR: 8294321: Fix typos in files under test/jdk/java, test/jdk/jdk, test/jdk/jni

2022-11-28 Thread Alan Bateman
On Mon, 28 Nov 2022 08:58:29 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which fixes the typos in the test > packages? @mernst submitted this as a separate PR > https://github.com/openjdk/jdk/pull/10029 but given the number of areas and > files that other PR touches, th

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

2022-11-28 Thread Alan Bateman
On Mon, 28 Nov 2022 10:36:40 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 [v16]

2022-11-28 Thread Alan Bateman
On Mon, 28 Nov 2022 10:47:47 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 [v17]

2022-11-29 Thread Alan Bateman
On Tue, 29 Nov 2022 09:40:58 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: 8297645: Drop the test/jdk/java/net/httpclient/reactivestreams-tck-tests/TckDriver.java test

2022-11-29 Thread Alan Bateman
On Tue, 29 Nov 2022 17:50:07 GMT, Daniel Fuchs wrote: > Please find here a fix that drops the HttpClient TckDiriver test. This test > has been useful when developing the HTTP client APIs. However, it has become > a burden to run this test, which is now the longest running HttpClient test. > Th

Re: RFR: 8297778: Modernize and improve module jdk.sctp

2022-11-29 Thread Alan Bateman
On Tue, 29 Nov 2022 16:46:43 GMT, Per Minborg wrote: > This PR proposes a variety of modernisations to the `jdk.sctp` module. > > During the fix of https://bugs.openjdk.org/browse/JDK-8296024, several > improvement areas were identified including: > > * Replacing duplicate code segments > *

Re: RFR: 8297778: Modernize and improve module jdk.sctp

2022-11-29 Thread Alan Bateman
On Tue, 29 Nov 2022 19:24:14 GMT, Roger Riggs wrote: > There could be more sharing of the unsupported implementation if SctpChannel > was not abstract and its method bodies threw the exception. There would less > duplication for unsupported platforms. I think this is accident of history. As I

Re: RFR: 8297778: Modernize and improve module jdk.sctp [v2]

2022-11-30 Thread Alan Bateman
On Wed, 30 Nov 2022 09:22:00 GMT, Per Minborg wrote: >> This PR proposes a variety of modernisations to the `jdk.sctp` module. >> >> During the fix of https://bugs.openjdk.org/browse/JDK-8296024, several >> improvement areas were identified including: >> >> * Replacing duplicate code segments

Re: RFR: 8297822: De-duplicate code in module jdk.sctp

2022-11-30 Thread Alan Bateman
On Wed, 30 Nov 2022 16:54:02 GMT, Per Minborg wrote: > This PR proposes merging logic and optimising three classes that exist for > aix, maces and windows. > > Optimisation will reduce byte code. Below is an example for one of the many > methods optimised. > > Before: > > public void implClo

Re: RFR: JDK-8297215: Update libs tests to use @enablePreview [v3]

2022-12-01 Thread Alan Bateman
On Thu, 1 Dec 2022 05:44:44 GMT, Joe Darcy wrote: >> Similar to an update recently done for langtools tests, update the libraries >> regression tests to take advantage of the @enablePreview jtreg feature. > > Joe Darcy has updated the pull request with a new target base due to a merge > or a re

Re: RFR: 8294047: HttpResponseInputStream swallows interrupts [v6]

2022-12-01 Thread Alan Bateman
On Thu, 1 Dec 2022 11:03:44 GMT, Darragh Clarke wrote: >> Currently if a `HttpResonseInputStream` gets interrupted while reading it >> will just swallow the exception and continue, >> >> This PR changes it to close the stream and throw an IOException, I added a >> test to cover this which just

Re: RFR: 8297778: Modernize and improve module jdk.sctp [v5]

2022-12-01 Thread Alan Bateman
On Thu, 1 Dec 2022 14:02:51 GMT, Per Minborg wrote: > > > receiverThread and senderThread are declared volatile but are always > > > accessed (r/w) whilst synchronising on the stateLock. > > @stsypanov Yes I am aware that this was a separate observation which is not > related to the assignment

Re: RFR: 8297822: De-duplicate code in module jdk.sctp [v3]

2022-12-01 Thread Alan Bateman
On Thu, 1 Dec 2022 11:25:28 GMT, Per Minborg wrote: >> This PR proposes merging logic and optimising three classes that exist for >> aix, maces and windows. >> >> Optimisation will reduce byte code. Below is an example for one of the many >> methods optimised. >> >> Before: >> >> public void

Re: RFR: 8297822: De-duplicate code in module jdk.sctp [v3]

2022-12-09 Thread Alan Bateman
On Thu, 1 Dec 2022 15:27:23 GMT, Alan Bateman wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Move and refactor classes to reduce duplication > > The latest update looks quite goo

Re: RFR: 8298589: java/net/SocketPermission/BindTest.java fails with NoClassDefFoundError: sun/nio/ch/sctp/UnsupportedUtil

2022-12-12 Thread Alan Bateman
On Mon, 12 Dec 2022 16:56:22 GMT, Per Minborg wrote: > This PR fixes a typo Marked as reviewed by alanb (Reviewer). - PR: https://git.openjdk.org/jdk/pull/11636

Re: RFR: 6914801: IPv6 unavailable if stdin is a socket

2022-12-15 Thread Alan Bateman
On Mon, 12 Dec 2022 20:30:05 GMT, Daniel Jeliński wrote: > This patch reenables IPv6 stack when stdin is an IPv4 socket. > > The code that blocked IPv6 was introduced in JDK-4673940 back when JDK could > only operate with either IPv4 or IPv6 sockets, and was using `IPv6_available` > to determi

Re: working around the deprecation of public URL constructors (JDK-8294241)

2022-12-15 Thread Alan Bateman
On 15/12/2022 19:14, Rick Hillegas wrote: I see many warnings when I build Apache Derby's code and javadoc with Open JDK build 20-ea+27-2213. In particular, I see a number of warnings introduced by the following change: - JDK-8294241: Deprecate URL public constructors I naively tried to fix

Re: RFR: JDK-8299475: Enhance SocketException by cause where it is missing in net and nio area

2023-01-02 Thread Alan Bateman
On Mon, 2 Jan 2023 16:16:08 GMT, Matthias Baesken wrote: > We have a couple of places where a SocketException is thrown but the cause is > omitted. It would be beneficial for example in error analysis not to throw > away the cause (causing exception) but to add it to the created > SocketExcept

Re: RFR: JDK-8299475: Enhance SocketException by cause where it is missing in net and nio area

2023-01-02 Thread Alan Bateman
On Mon, 2 Jan 2023 16:16:08 GMT, Matthias Baesken wrote: > We have a couple of places where a SocketException is thrown but the cause is > omitted. It would be beneficial for example in error analysis not to throw > away the cause (causing exception) but to add it to the created > SocketExcept

Re: RFR: 8299437: Make InetSocketAddressHolder shallowly immutable

2023-01-02 Thread Alan Bateman
On Mon, 2 Jan 2023 09:00:43 GMT, Per Minborg wrote: > This PR proposes to make the class > `java.net.InetSocketAddress.InetSocketAddressHolder` shallowly immutable Well spotted, I don't know why these fields weren't final from the start. - Marked as reviewed by alanb (Reviewer).

Re: RFR: JDK-8299475: Enhance SocketException by cause where it is missing in net and nio area [v2]

2023-01-03 Thread Alan Bateman
On Tue, 3 Jan 2023 08:29:41 GMT, Matthias Baesken wrote: > Hi Alan, I removed the InterruptedIOException enhancement . Regarding the > ConnectionResetException in NioSocketImpl.java, it is not so bad to know what > tryRead caused it. So why not add it ? > > Additionally we could also add the e

Re: RFR: JDK-8299475: Enhance SocketException by cause where it is missing in net and nio area [v2]

2023-01-03 Thread Alan Bateman
On Tue, 3 Jan 2023 08:29:13 GMT, Matthias Baesken wrote: >> We have a couple of places where a SocketException is thrown but the cause >> is omitted. It would be beneficial for example in error analysis not to >> throw away the cause (causing exception) but to add it to the created >> SocketEx

Re: RFR: JDK-8299475: Enhance SocketException by cause where it is missing in net and nio area [v2]

2023-01-03 Thread Alan Bateman
On Tue, 3 Jan 2023 08:47:24 GMT, Matthias Baesken wrote: > Hi Alan, do you mean some new class like > java/net/SocketConnectionResetException.java (or a more suitable name) ? Yes, although we never managed to come up to agreement on whether to introduce a standard exception. For now, it is imp

Re: RFR: JDK-8299475: Enhance SocketException by cause where it is missing in net and nio area [v2]

2023-01-03 Thread Alan Bateman
On Tue, 3 Jan 2023 08:50:10 GMT, Matthias Baesken wrote: >> src/java.base/share/classes/java/net/Socket.java line 535: >> >>> 533: created = true; >>> 534: } catch (IOException e) { >>> 535: throw new SocketException(e.getMessage(), e); >> >> For this one, you co

Re: RFR: JDK-8299475: Enhance SocketException by cause where it is missing in net and nio area [v2]

2023-01-03 Thread Alan Bateman
On Tue, 3 Jan 2023 10:25:21 GMT, Matthias Baesken wrote: >> Our SocketImpls mostly throw SocketException so inserting the catch of >> SocketException will avoid the translation for most cases. > > Replacing the IOException does not work, this even leads to a compile error " > unreported excepti

Re: RFR: JDK-8299475: Enhance SocketException by cause where it is missing in net and nio area [v3]

2023-01-03 Thread Alan Bateman
On Tue, 3 Jan 2023 10:47:11 GMT, Matthias Baesken wrote: >> We have a couple of places where a SocketException is thrown but the cause >> is omitted. It would be beneficial for example in error analysis not to >> throw away the cause (causing exception) but to add it to the created >> SocketEx

  1   2   3   4   5   6   >