Re: RFR: 8186958: Need method to create pre-sized HashMap [v18]

2022-04-14 Thread Chris Hegarty
On Wed, 13 Apr 2022 22:20:14 GMT, XenoAmess wrote: >> 8186958: Need method to create pre-sized HashMap > > XenoAmess has updated the pull request incrementally with one additional > commit since the last revision: > > update LastModified LGTM. - Marked as reviewed by chegar

Re: RFR: 8281223: Improve the API documentation of HttpRequest.Builder::build to state that the default implementation provided by the JDK returns immutable objects. [v2]

2022-03-26 Thread Chris Hegarty
On Tue, 15 Feb 2022 15:33:01 GMT, Conor Cleary wrote: >> As described in the title, this is a simple change to the >> `HttpRequest.Builder::build` method to highlight that an immutable and >> reusable instance of an `HttpRequest` is created when this method is >> invoked. This is done by

Re: RFR: 8244202: Implementation of JEP 418: Internet-Address Resolution SPI [v12]

2021-11-11 Thread Chris Hegarty
On Wed, 3 Nov 2021 13:23:36 GMT, Aleksei Efimov wrote: >> This change implements a new service provider interface for host name and >> address resolution, so that java.net.InetAddress API can make use of >> resolvers other than the platform's built-in resolver. >> >> The following API classes

Re: RFR: 8245095: Implementation of JEP 408: Simple Web Server [v5]

2021-09-22 Thread Chris Hegarty
On Tue, 21 Sep 2021 14:09:54 GMT, Julia Boes wrote: >> This change implements a simple web server that can be run on the >> command-line with `java -m jdk.httpserver`. >> >> This is facilitated by adding an entry point for the `jdk.httpserver` >> module, an implementation class whose main

Re: CFV: New Networking Group Member: Patrick Concannon

2021-08-25 Thread Chris Hegarty
> On 25 Aug 2021, at 10:10, Daniel Fuchs wrote: > > I hereby nominate Patrick Concannon to Membership in the Networking > Group. Vote: Yes -Chris

Re: RFR: 8258951: java/net/httpclient/HandshakeFailureTest.java failed with "RuntimeException: Not found expected SSLHandshakeException in java.io.IOException"

2021-08-19 Thread Chris Hegarty
On Thu, 19 Aug 2021 14:02:28 GMT, Daniel Fuchs wrote: > Please find here a patch that fixes intermittent failures in > HandshakeFailureTest.java. The test expects an SSLException but finds an > AssertionError instead. The AssertionError was too strong and was fired > before the

Re: RFR: 8272334: com.sun.net.httpserver.HttpExchange: Improve API doc of getRequestHeaders [v2]

2021-08-17 Thread Chris Hegarty
On Tue, 17 Aug 2021 10:55:02 GMT, Julia Boes wrote: >> This is a doc-only fix that improves the wording of the API doc of >> `getRequestHeaders()`. The other changes are trivial cleanup. > > Julia Boes has updated the pull request incrementally with one additional > commit since the last

Re: RFR: 8272334: com.sun.net.httpserver.HttpExchange: Improve API doc of getRequestHeaders

2021-08-16 Thread Chris Hegarty
On Thu, 12 Aug 2021 13:44:23 GMT, Julia Boes wrote: > This is a doc-only fix that improves the wording of the API doc of > `getRequestHeaders()`. The other changes are trivial cleanup. Marked as reviewed by chegar (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/5100

Re: RFR: 8270903: sun.net.httpserver.HttpConnection: Improve toString

2021-08-04 Thread Chris Hegarty
On Wed, 4 Aug 2021 10:54:10 GMT, Daniel Fuchs wrote: >> This is a minor change that updates >> `sun.net.httpserver.HttpConnection::toString` to never return null. >> >> Testing: tier 1-3 all clear > > src/jdk.httpserver/share/classes/sun/net/httpserver/HttpConnection.java line > 69: > >> 67:

Re: RFR: 8270903: sun.net.httpserver.HttpConnection: Improve toString

2021-08-04 Thread Chris Hegarty
On Thu, 29 Jul 2021 10:22:51 GMT, Julia Boes wrote: > This is a minor change that updates > `sun.net.httpserver.HttpConnection::toString` to never return null. > > Testing: tier 1-3 all clear Marked as reviewed by chegar (Reviewer). - PR:

Re: RFR: 8271396: Spelling errors

2021-07-28 Thread Chris Hegarty
On Wed, 3 Feb 2021 19:12:25 GMT, Emmanuel Bourg wrote: > This PR fixes the following spelling errors: > > choosen -> chosen > commad -> command > hiearchy -> hierarchy > leagacy -> legacy > minium -> minimum > subsytem -> subsystem > unamed -> unnamed Trivially, looks ok to me.

Re: RFR: 8263531: Remove unused buffer int

2021-07-13 Thread Chris Hegarty
On Mon, 12 Jul 2021 20:39:53 GMT, Christoph Langer wrote: > The change for JDK-8257001 left an obsolete int field. Remove it. Marked as reviewed by chegar (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/4759

Re: RFR: 8269481: SctpMultiChannel never releases own file descriptor [v6]

2021-07-07 Thread Chris Hegarty
On Tue, 6 Jul 2021 16:56:17 GMT, Brian Burkhalter wrote: >> Please review this change to the Unix implementations of >> `sun.nio.ch.sctp.Sctp*ChannelImpl#kill()` to close the socket if `state == >> ChannelState.UNINITIALIZED`. > > Brian Burkhalter has updated the pull request incrementally

Re: RFR: 8269917: Insert missing commas in copyrights in java.net

2021-07-06 Thread Chris Hegarty
On Tue, 6 Jul 2021 14:41:18 GMT, Patrick Concannon wrote: > Hi, > > Could someone please review my patch for Inserting missing commas in > copyright headers from files in java.net. These commas were mistakenly left > out of PR https://github.com/openjdk/jdk/pull/4574. > > Kind regards, > >

Re: [jdk17] RFR: 8269772: [macos-aarch64] test compilation failed with "SocketException: No buffer space available"

2021-07-06 Thread Chris Hegarty
On Mon, 5 Jul 2021 11:21:39 GMT, Daniel Fuchs wrote: > Please find here a trivial fix for: > > 8269772: [macos-aarch64] test compilation failed with "SocketException: No > buffer space available" > > Running several of the websocket tests concurrently on some of the CI > machines is causing

Re: RFR: 8269481: SctpMultiChannel never releases own file descriptor [v2]

2021-06-29 Thread Chris Hegarty
On Tue, 29 Jun 2021 16:10:44 GMT, Brian Burkhalter wrote: >> Please review this change to the Unix implementations of >> `sun.nio.ch.sctp.Sctp*ChannelImpl#kill()` to close the socket if `state == >> ChannelState.UNINITIALIZED`. > > Brian Burkhalter has updated the pull request incrementally

Re: RFR: 8253119: Remove the legacy PlainSocketImpl and PlainDatagramSocketImpl implementation [v3]

2021-06-24 Thread Chris Hegarty
On Thu, 24 Jun 2021 11:44:19 GMT, Patrick Concannon wrote: >> Hi, >> >> Could someone please review my changes for the removal of the legacy >> `PlainSocketImpl` and `PlainDatagramSocketImpl` implementations? >> >> In JDK 13, JEP 353 provided a drop in replacement for the legacy >>

Re: RFR: 8268960: com/sun/net/httpserver/Headers.java: Ensure mutators normalize keys and disallow null for keys and values [v3]

2021-06-24 Thread Chris Hegarty
On Wed, 23 Jun 2021 18:02:02 GMT, Julia Boes wrote: >> `com.sun.net.httpserver.Headers` normalizes its keys to adhere to the >> following format: First character uppercase, all other characters lowercase, >> for example `"foo" -> "Foo"`. This behaviour is not consistent across the >> mutator

Re: [jdk17] RFR: JDK-8265369 [macos-aarch64] java/net/MulticastSocket/Promiscuous.java failed with "SocketException: Cannot allocate memory" [v3]

2021-06-18 Thread Chris Hegarty
On Thu, 17 Jun 2021 21:31:48 GMT, Mark Sheppard wrote: >> JDK-8265369 [macos-aarch64] java/net/MulticastSocket/Promiscuous.java failed >> with "SocketException: Cannot allocate memory" >> >> The test java/net/MulticastSocket/Promiscuous.java has been observed to fail >> on a regular basis on

Re: RFR: 8268900: com/sun/net/httpserver/Headers.java: Fix indentation and whitespace

2021-06-17 Thread Chris Hegarty
On Thu, 17 Jun 2021 09:17:24 GMT, Julia Boes wrote: > This cleanup-only change fixes the indentation of all members from 8 to 4 > spaces and removes whitespace in method invocations (example: `foo ()` -> > `foo()`). It also removes superfluous type parameters on lines 83, 168, 206. Marked as

Re: [jdk17] RFR: 8268714: [macos-aarch64] 7 java/net/httpclient/websocket tests failed

2021-06-16 Thread Chris Hegarty
On Wed, 16 Jun 2021 13:53:38 GMT, Daniel Fuchs wrote: > Hi, > > Please find below a test-only change to fix some intermittent failures > observed with the httpclient/websocket tests: > these tests intermittently and randomly fail with ENOMEM ("No buffer space > available"). > > Some

Re: [jdk17] RFR: JDK-8265369 [macos-aarch64] java/net/MulticastSocket/Promiscuous.java failed with "SocketException: Cannot allocate memory"

2021-06-15 Thread Chris Hegarty
On Mon, 14 Jun 2021 15:28:01 GMT, Mark Sheppard wrote: > JDK-8265369 [macos-aarch64] java/net/MulticastSocket/Promiscuous.java failed > with "SocketException: Cannot allocate memory" > > The test java/net/MulticastSocket/Promiscuous.java has been observed to fail > on a regular basis on

Re: [jdk17] RFR: 8268555: Update HttpClient tests that use ITestContext to jtreg 6+1

2021-06-11 Thread Chris Hegarty
On Thu, 10 Jun 2021 17:39:58 GMT, Daniel Fuchs wrote: > Another change brought by jtreg 6+1 in the behavior of @BeforeMethod. > Now throwing an exception in @BeforeMethod causes all annotated methods to be > skipped, not just those annotated with @Test. > > HttpClient tests that use

Re: RFR: 8264975: java/net/DatagramSocket/DatagramSocketMulticasting.java fails infrequently [v2]

2021-06-02 Thread Chris Hegarty
On Wed, 2 Jun 2021 17:52:34 GMT, Daniel Fuchs wrote: >> Please find below a fix that will make >> `java/net/DatagramSocket/DatagramSocketMulticasting.java` more resilient to >> the rare case where addresses bound to a network interfaces are updated >> while the test is running. >> >> Instead

Re: RFR: 8268056: Update java.net and java.nio to use switch expressions [v4]

2021-06-02 Thread Chris Hegarty
On Wed, 2 Jun 2021 11:06:46 GMT, Patrick Concannon wrote: >> Hi, >> >> Could someone please review my code for updating the code in the `java.net` >> and `java.nio` packages to make use of the switch expressions? >> >> Kind regards, >> Patrick > > Patrick Concannon has updated the pull

Re: RFR: 8268056: Update java.net and java.nio to use switch expressions [v2]

2021-06-02 Thread Chris Hegarty
On Tue, 1 Jun 2021 17:20:38 GMT, Patrick Concannon wrote: >> Hi, >> >> Could someone please review my code for updating the code in the `java.net` >> and `java.nio` packages to make use of the switch expressions? >> >> Kind regards, >> Patrick > > Patrick Concannon has updated the pull

Re: RFR: 8268023: Improve diagnostic for HandshakeFailureTest

2021-06-01 Thread Chris Hegarty
On Tue, 1 Jun 2021 12:09:26 GMT, Daniel Fuchs wrote: > Please find below a trivial change to improve diagnostic in case of failure > in the HandshakeFailureTest. > The AssertionError observed will have more information next time it fires, > and the stack trace will appear as the cause of the

Re: RFR: 8267990: Revisit some uses of `synchronized` in the HttpClient API

2021-05-31 Thread Chris Hegarty
On Mon, 31 May 2021 16:21:29 GMT, Daniel Fuchs wrote: > The Utils.remaining(List list) method assumes that it can and > should synchronize on the given list to prevent concurrent modification. In > 99% of the cases this assumption is wrong. There's only one such list (the > SSLFlowDelegate

Re: RFR: 8267938: (sctp) SCTP channel factory methods should check platform support

2021-05-28 Thread Chris Hegarty
On Fri, 28 May 2021 14:31:56 GMT, Alan Bateman wrote: > EPROTONOSUPPORT and ESOCKTNOSUPPORT are subtly different and I don't know if > ESOCKTNOSUPPORT is possible. Checking both errors is okay/harmless so I think > this change is okay. ESOCKTNOSUPPORT is the reported error for SOCK_SEQPACKET

Re: RFR: 8265367: [macos-aarch64] 3 java/net/httpclient/websocket tests fail with "IOException: No buffer space available" [v2]

2021-05-28 Thread Chris Hegarty
On Thu, 27 May 2021 13:20:26 GMT, Daniel Fuchs wrote: >> Hi, >> >> Please find below a fix for: >> 8265367: [macos-aarch64] 3 java/net/httpclient/websocket tests fail with >> "IOException: No buffer space available" >> >> The Pending* websocket tests create a server that accepts sockets to

RFR: 8267938: SCTP channel factory methods should check platform support

2021-05-28 Thread Chris Hegarty
The SCTP channel factory methods, namely SctpChannel::open, SctpServerChannel::open, and SctpMultiChannel::open, are specified to throw UnsupportedOperationException, if the SCTP protocol is not supported. Currently, underlying platform support is assumed once the appropriate libsctp.so.1

Re: RFR: 8267353: java/net/SctpSanity.java fails due to Protocol not supported

2021-05-27 Thread Chris Hegarty
On Thu, 27 May 2021 00:41:25 GMT, Jie Fu wrote: >>> if sctp is configured on a linux system would there exist a /proc/net/sctp >>> and have an entry in /proc/net/protocols ? >> >> No /proc/net/sctp and no entry in /proc/net/protocols. >> But I don't think it's the reason since it passed on

Re: RFR: 8267353: java/net/SctpSanity.java fails due to Protocol not supported

2021-05-26 Thread Chris Hegarty
On Wed, 26 May 2021 03:54:14 GMT, Jie Fu wrote: > Hi all, > > java/net/SctpSanity.java fails on some of our test machines due to Protocol > not supported. > The reason is that the test fails to detect all the cases when a machine > doesn't support SCTP. > > The fix just follows what are done

Re: RFR: 8267353: java/net/SctpSanity.java fails due to Protocol not supported

2021-05-26 Thread Chris Hegarty
On Wed, 26 May 2021 14:32:22 GMT, Jie Fu wrote: > > This is probably ok, but a little surprising. Can you say a more about the > > machine setup? > > What do you mean by `setup`? > And how can I get these setups? > Thanks. Let me rephrase. You said: "The reason is that the test fails to

Re: RFR: 8267353: java/net/SctpSanity.java fails due to Protocol not supported

2021-05-26 Thread Chris Hegarty
On Wed, 26 May 2021 03:54:14 GMT, Jie Fu wrote: > Hi all, > > java/net/SctpSanity.java fails on some of our test machines due to Protocol > not supported. > The reason is that the test fails to detect all the cases when a machine > doesn't support SCTP. > > The fix just follows what are done

New Networking Group Member: Daniel Fuchs

2021-05-26 Thread Chris Hegarty
The vote for Daniel Fuchs [1] is now closed. Yes: 3 Veto: 0 Abstain: 0 According to the Bylaws definition of Lazy Consensus, this is sufficient to approve the nomination. -Chris. [1] https://mail.openjdk.java.net/pipermail/net-dev/2021-May/015847.html

Re: RFR: 8267262: com/sun/net/httpserver/Filter improve API documentation of static methods

2021-05-19 Thread Chris Hegarty
On Tue, 18 May 2021 09:49:26 GMT, Daniel Fuchs wrote: >> The filter operation `Consumer` that is passed to the factory methods can >> throw an unchecked exception. This change adds a note on the exception >> handling in that case. It also adds a clarification to >> `Filter::afterHandler` on

Re: RFR: 8267262: com/sun/net/httpserver/Filter improve API documentation of static methods

2021-05-19 Thread Chris Hegarty
On Tue, 18 May 2021 09:34:25 GMT, Julia Boes wrote: > The filter operation `Consumer` that is passed to the factory methods can > throw an unchecked exception. This change adds a note on the exception > handling in that case. It also adds a clarification to `Filter::afterHandler` > on the

Re: RFR: 8266459: Implement JEP 411: Deprecate the Security Manager for Removal

2021-05-18 Thread Chris Hegarty
On Mon, 17 May 2021 18:23:41 GMT, Weijun Wang wrote: > Please review this implementation of [JEP > 411](https://openjdk.java.net/jeps/411). > > The code change is divided into 3 commits. Please review them one by one. > > 1. >

Re: RFR: 8266897: com/sun/net/httpserver/FilterTest.java fails intermittently with AssertionError

2021-05-17 Thread Chris Hegarty
On Mon, 17 May 2021 09:53:06 GMT, Julia Boes wrote: > The tests for `afterHandler` filters expect the filter operation to happen > before the assertion. Very rarely this is not the case, the calling thread > reads the response before the filter operation is executed, so the test value > is

Re: CFV: New Networking Group Member: Daniel Fuchs

2021-05-12 Thread Chris Hegarty
Vote: YES -Chris. > On 12 May 2021, at 11:58, Chris Hegarty wrote: > > I hereby nominate Daniel Fuchs to Membership in the Networking > Group.

CFV: New Networking Group Member: Daniel Fuchs

2021-05-12 Thread Chris Hegarty
I hereby nominate Daniel Fuchs to Membership in the Networking Group. Daniel is a Reviewer in the JDK project, and a long term contributor to the Java platform. Daniel has been actively participating in the evolution and maintenance of the networking libraries for several years. Daniel was a

Re: RFR: 8266761: AssertionError in sun.net.httpserver.ServerImpl.responseCompleted [v3]

2021-05-11 Thread Chris Hegarty
On Mon, 10 May 2021 19:31:32 GMT, Daniel Fuchs wrote: >> Hi, >> >> Please find here a fix to prevent an assertion error from firing in the >> com.sun.net.httpserver. >> >> The issue occurs systematically when all of these conditions are met: >> >> 1. System assertions are enabled >> 2. The

Re: RFR: 8255227: java/net/httpclient/FlowAdapterPublisherTest.java intermittently failing with TestServer: start exception: java.io.IOException: Invalid preface

2021-04-30 Thread Chris Hegarty
On Fri, 30 Apr 2021 10:46:33 GMT, Daniel Fuchs wrote: > Hi, > > I stumbled on an issue in Stream.java where an assert was misplaced, > preventing the proper IOException to be triggered. I believe this is what > caused the FlowAdapterPublisherTest.java to fail with the "Invalid Preface" >

Re: RFR: 8266155: Convert java.base to use Stream.toList() [v2]

2021-04-28 Thread Chris Hegarty
On Wed, 28 Apr 2021 16:57:25 GMT, Ian Graves wrote: >> 8266155: Convert java.base to use Stream.toList() > > Ian Graves has updated the pull request incrementally with one additional > commit since the last revision: > > Removing redundant imports Marked as reviewed by chegar (Reviewer).

Re: RFR: 8266155: Convert java.base to use Stream.toList()

2021-04-28 Thread Chris Hegarty
On Tue, 27 Apr 2021 21:34:02 GMT, Ian Graves wrote: > 8266155: Convert java.base to use Stream.toList() Marked as reviewed by chegar (Reviewer). src/java.base/share/classes/java/lang/invoke/MethodHandles.java line 6788: > 6786: } > 6787: > 6788: /** I think the import of Collectors

Re: RFR: 8265123: Add static factory methods to com.sun.net.httpserver.Filter [v4]

2021-04-28 Thread Chris Hegarty
On Wed, 28 Apr 2021 11:26:18 GMT, Julia Boes wrote: >> Add two static factory methods to com.sun.net.httpserver.Filter that >> facilitate the creation of pre- and post-processing Filters: >> >> `public static Filter beforeResponse(String description, >> Consumer filterImpl) {}` >> `public

Re: RFR: 8265123: Add static factory methods to com.sun.net.httpserver.Filter

2021-04-14 Thread Chris Hegarty
On Tue, 13 Apr 2021 15:39:17 GMT, Julia Boes wrote: > Add two static factory methods to com.sun.net.httpserver that facilitate the > creation of pre- and post-processing Filters: > > `public static Filter beforeResponse(String description, > Consumer filterImpl) {}` > `public static Filter

Re: RFR: 8263899: HttpClient throws NPE in AuthenticationFilter when parsing www-authenticate head [v4]

2021-03-24 Thread Chris Hegarty
On Tue, 23 Mar 2021 13:45:06 GMT, Michael McMahon wrote: >> Could I get the following simple fix reviewed please? >> >> The bug is jdk.internal.net.http.AuthenticationFilter throws an NPE wrapped >> in an IOException if it receives a HTTP response containing a >> WWW-Authenticate header with

Re: RFR: 8263899: HttpClient throws NPE in AuthenticationFilter when parsing www-authenticate head

2021-03-22 Thread Chris Hegarty
On Mon, 22 Mar 2021 09:26:08 GMT, Michael McMahon wrote: > Could I get the following simple fix reviewed please? > > Thanks, > Michael. test/jdk/java/net/httpclient/EmptyAuthenticate.java line 44: > 42: > 43: public static void main(String[] args) throws IOException, >

Re: RFR: JDK-8257235: [PATCH] InetAddress.isReachable: Try to use an IPPROTO_ICMP socket type before attempting RAW_SOCK [v2]

2021-03-19 Thread Chris Hegarty
On Tue, 16 Feb 2021 13:37:20 GMT, Jamie Le Tual wrote: >> I think that the changes are mostly good. I would like to try them out on my >> local system and our internal buildAndTest system. > >> I think that the changes are mostly good. I would like to try them out on my >> local system and

Integrated: 8263818: Release JNI local references in get/set-InetXXAddress-member helper functions of net_util.c

2021-03-19 Thread Chris Hegarty
On Thu, 18 Mar 2021 14:57:16 GMT, Chris Hegarty wrote: > As per the Java Native Interface Specification: "All Java objects returned by > JNI functions are local references." [1]. > > The get/set-InetXXAddress-member helper functions in net_util.c retrieve a > local

Re: RFR: 8187450: JNI local refs exceeds capacity warning in NetworkInterface::getAll [v4]

2021-03-18 Thread Chris Hegarty
On Tue, 16 Mar 2021 15:41:21 GMT, Andrew Haley wrote: >> Thanks for making these changes. This is much easier to review now. I'm not >> an expert with JNI ref - but the logic now looks right. > > Please hold off on this; there's an issue to clear up. @theRealAph Please let me know when this PR

RFR: 8263818: Initial changesRelease JNI local references in get/set-InetXXAddress-member helper functions of net_util.c

2021-03-18 Thread Chris Hegarty
As per the Java Native Interface Specification: "All Java objects returned by JNI functions are local references." [1]. The get/set-InetXXAddress-member helper functions in net_util.c retrieve a local reference to the internal `holder` before operating on the InetAddress object. These

Re: RFR: 8187450: JNI local refs exceeds capacity warning in NetworkInterface::getAll [v4]

2021-03-16 Thread Chris Hegarty
ace} ip addr add 192.168.2.${num}/24 dev >> veth${namespace}${num} >> sudo ip link set vethhost${num} up >> sudo ip netns exec ${namespace} ip link set veth${namespace}${num} up >> >> count="$(sudo ip netns exec ${namespace} ip link show |grep UP | wc -l)&qu

Re: RFR: 8187450: JNI local refs exceeds capacity warning in NetworkInterface::getAll

2021-03-15 Thread Chris Hegarty
On Sun, 14 Mar 2021 12:29:45 GMT, Alan Bateman wrote: >> This is an adaptation of a patch originally written by Shafi Ahmad in >> a comment on the JBS page but never submitted or merged. >> >> With -Xcheck:jni, the method java.net.NetworkInterface.getAll very >> quickly breaches the default JNI

Re: RFR: 8187450: JNI local refs exceeds capacity warning in NetworkInterface::getAll [v3]

2021-03-15 Thread Chris Hegarty
On Mon, 15 Mar 2021 16:59:24 GMT, Jonathan Dowland wrote: >> This is an adaptation of a patch originally written by Shafi Ahmad in >> a comment on the JBS page but never submitted or merged. >> >> With -Xcheck:jni, the method java.net.NetworkInterface.getAll very >> quickly breaches the default

Re: RFR: 8187450: JNI local refs exceeds capacity warning in NetworkInterface::getAll [v2]

2021-03-15 Thread Chris Hegarty
On Mon, 15 Mar 2021 12:53:16 GMT, Jonathan Dowland wrote: >> This is an adaptation of a patch originally written by Shafi Ahmad in >> a comment on the JBS page but never submitted or merged. >> >> With -Xcheck:jni, the method java.net.NetworkInterface.getAll very >> quickly breaches the default

Re: RFR: 8263233: Update java.net and java.nio to use instanceof pattern variable [v3]

2021-03-10 Thread Chris Hegarty
On Tue, 9 Mar 2021 20:52:19 GMT, Mark Sheppard wrote: >> The disadvantage is that it would add another level of braces. > > maybe ... I find it would provide an easier flow to code ... an "easy on the > eye" call flow linkage - the variable is declared and then used instead > of the

Re: RFR: 8263233: Update java.net and java.nio to use instanceof pattern variable

2021-03-09 Thread Chris Hegarty
On Tue, 9 Mar 2021 11:07:07 GMT, Patrick Concannon wrote: > Hi, > > Could someone please review my code for updating the code in the `java.net` > and `java.nio` packages to make use of the `instanceof` pattern variable? > > Kind regards, > Patrick

Re: RFR: 8252831: Correct "no comment" warnings in jdk.net module

2021-03-02 Thread Chris Hegarty
On Tue, 2 Mar 2021 10:15:13 GMT, Patrick Concannon wrote: > Hi, > > Could someone please review my changeset that fixes the "no comment" warnings > generated by `javadoc -Xdoclint` for `java.base/jdk.net`? > > Kind regards, > Patrick Marked as reviewed by chegar (Reviewer). -

Re: RFR: 8253100: Fix "no comment" warnings in java.base/java.net [v3]

2021-02-26 Thread Chris Hegarty
On Fri, 26 Feb 2021 10:59:01 GMT, Daniel Fuchs wrote: >> Hi, >> >> Please find here a change that fixes "no comment" warnings generated by >> `javadoc -Xdoclint` for `java.base/java.net` > > Daniel Fuchs has updated the pull request incrementally with one additional > commit since the last

Re: RFR: 8262195: Harden tests that use the HostsFileNameService (jdk.net.hosts.file property) [v2]

2021-02-26 Thread Chris Hegarty
On Thu, 25 Feb 2021 15:38:02 GMT, Conor Cleary wrote: >> A number of net tests use a >> **[HostsFileNameService](https://github.com/openjdk/jdk/blob/382e38dd246596ec94a1f1ce0e0f9e87f53366c7/src/java.base/share/classes/java/net/InetAddress.java#L955)** >> to verify either the functionality of

Re: RFR: JDK-8262430: doclint warnings in java.base module

2021-02-26 Thread Chris Hegarty
On Thu, 25 Feb 2021 22:59:23 GMT, Jonathan Gibbons wrote: > Please review some simple doc fixes in the `java.base` module. Two were > reported by doclint; the spelling error was detected by the IDE. Marked as reviewed by chegar (Reviewer). - PR:

Integrated: 8262296 Fix remaining doclint warnings in jdk.httpserver

2021-02-25 Thread Chris Hegarty
On Wed, 24 Feb 2021 13:58:38 GMT, Chris Hegarty wrote: > Trivial clean up of remaining doclint warnings in jdk.httpserver. > > The minor spec clarifications do not amount to a normative change, so no CSR > is required (they're documented the obvious and only possible behaviour)

Re: RFR: 8262296 Fix remaining doclint warnings in jdk.httpserver [v2]

2021-02-24 Thread Chris Hegarty
> Trivial clean up of remaining doclint warnings in jdk.httpserver. > > The minor spec clarifications do not amount to a normative change, so no CSR > is required (they're documented the obvious and only possible behaviour). Chris Hegarty has updated the pull request incrementa

Re: RFR: 8262195: Harden tests that use the HostsFileNameService (jdk.net.hosts.file property)

2021-02-24 Thread Chris Hegarty
On Wed, 24 Feb 2021 15:54:29 GMT, Michael McMahon wrote: >> A number of net tests use a >> **[HostsFileNameService](https://github.com/openjdk/jdk/blob/382e38dd246596ec94a1f1ce0e0f9e87f53366c7/src/java.base/share/classes/java/net/InetAddress.java#L955)** >> to verify either the functionality

RFR: 8262296 Fix remaining doclint warnings in jdk.httpserver

2021-02-24 Thread Chris Hegarty
Trivial clean up of remaining doclint warnings in jdk.httpserver. The minor spec clarifications do not amount to a normative change, so no CSR is required (they're documented the obvious and only possible behaviour). - Commit messages: - Initial changes Changes:

Re: RFR: 8262027: Improve how HttpConnection detects a closed channel when taking/returning a connection to the pool [v6]

2021-02-24 Thread Chris Hegarty
On Tue, 23 Feb 2021 17:20:13 GMT, Daniel Fuchs wrote: >> Hi, >> >> Please find here a fix for: >> 8262027: Improve how HttpConnection detects a closed channel when >> taking/returning a connection to the pool >> >> While writing a new test to verify that it was possible to handle proxy >>

Re: RFR: 8262027: Improve how HttpConnection detects a closed channel when taking/returning a connection to the pool [v5]

2021-02-23 Thread Chris Hegarty
On Mon, 22 Feb 2021 16:44:15 GMT, Daniel Fuchs wrote: >> Hi, >> >> Please find here a fix for: >> 8262027: Improve how HttpConnection detects a closed channel when >> taking/returning a connection to the pool >> >> While writing a new test to verify that it was possible to handle proxy >>

Re: RFR: 8261880: Change nested classes in java.base to static nested classes where possible [v2]

2021-02-18 Thread Chris Hegarty
On Wed, 17 Feb 2021 16:38:03 GMT, Сергей Цыпанов wrote: >> Non-static classes hold a link to their parent classes, which in many cases >> can be avoided. > > Сергей Цыпанов has updated the pull request incrementally with one additional > commit since the last revision: > > 8261880: Remove

Re: RFR: JDK-8261791: handleSendFailed in SctpChannelImpl.c potential leaks

2021-02-17 Thread Chris Hegarty
On Wed, 17 Feb 2021 10:30:45 GMT, Chris Hegarty wrote: >> In another bug this question from me was answered by Alan Bateman : >> >> Btw. while adjusting Java_sun_nio_ch_sctp_SctpChannelImpl_receive0 , I >> started to wonder what happens to the allocated

Re: RFR: JDK-8261791: handleSendFailed in SctpChannelImpl.c potential leaks

2021-02-17 Thread Chris Hegarty
On Tue, 16 Feb 2021 12:26:54 GMT, Matthias Baesken wrote: > In another bug this question from me was answered by Alan Bateman : > > Btw. while adjusting Java_sun_nio_ch_sctp_SctpChannelImpl_receive0 , I > started to wonder what happens to the allocated memory in the same file in >

Re: RFR: 8133686: HttpURLConnection.getHeaderFields and URLConnection.getRequestProperties methods return field values in reverse order [v2]

2021-02-08 Thread Chris Hegarty
On Fri, 29 Jan 2021 10:59:20 GMT, Evan Whelan wrote: >> src/java.base/share/classes/java/net/URLConnection.java line 596: >> >>> 594: * corresponding values, they must be returned in the order they >>> were added, >>> 595: * preserving the insertion-order. >>> 596: * >> >> Here

Re: RFR: 8133686: HttpURLConnection.getHeaderFields and URLConnection.getRequestProperties methods return field values in reverse order [v2]

2021-02-08 Thread Chris Hegarty
On Fri, 29 Jan 2021 11:03:07 GMT, Evan Whelan wrote: >> Hi all, >> >> Please review this fix for which corrects the order in which field values >> are returned from the `HttpURLConnection.getHeaderFields` and >> `URLConnection.getRequestProperties` methods. >> >> Currently, the

Re: RFR: 8235139: Remove the socket impl factory mechanism [v3]

2021-02-05 Thread Chris Hegarty
On Fri, 5 Feb 2021 11:25:57 GMT, Patrick Concannon wrote: >> Hi, >> >> Could someone please review my proposed changeset for JDK-8235139: '`Remove >> the socket impl factory mechanism`' ? >> >> These changes propose to deprecate (for the eventual removal) the API points >> for statically

Re: RFR: JDK-8241995: Clarify InetSocketAddress::toString specification

2021-02-03 Thread Chris Hegarty
On Tue, 2 Feb 2021 15:55:40 GMT, Julia Boes wrote: > This change clarifies the InetSocketAddress::toString specification, which > was recently updated to reflect an implementation change [1]. The > specification is not changed, but it is enhanced with two examples and some > more verbiage, as

Re: RFR: 8260043: Reduce allocation in sun.net.www.protocol.jar.Handler.parseURL [v2]

2021-01-21 Thread Chris Hegarty
On Thu, 21 Jan 2021 09:48:50 GMT, Chris Hegarty wrote: >> Eirik Bjorsnos has updated the pull request incrementally with one >> additional commit since the last revision: >> >> As a part of the rename from "canonize" to "canonicalize&

Re: RFR: 8260043: Reduce allocation in sun.net.www.protocol.jar.Handler.parseURL [v2]

2021-01-21 Thread Chris Hegarty
On Wed, 20 Jan 2021 15:46:13 GMT, Eirik Bjørsnøs wrote: >> By moving string splitting and concatenation into the canonizeString >> utility, we can defer allocation until we determine that canonization is >> required. This saves two string allocations and a string concat for the >> common

Re: RFR: JDK-8257235: [PATCH] InetAddress.isReachable: Try to use an IPPROTO_ICMP socket type before attempting RAW_SOCK [v2]

2021-01-18 Thread Chris Hegarty
On Wed, 23 Dec 2020 14:06:12 GMT, Jamie Le Tual wrote: >> Users have been able to send ICMP packets without the need for root >> privileges or the CAP_NET_RAW capability since at least kernel 3.11. >> >> For some time now, if the kernel parameter net.ipv4.ping_group_range >> included the gid

Re: RFR: 7146776: deadlock between URLStreamHandler.getHostAddress and file.Handler.openconnection [v2]

2021-01-18 Thread Chris Hegarty
On Sun, 17 Jan 2021 02:02:54 GMT, Jaikiran Pai wrote: >> As noted by the reporter in the comments of >> https://bugs.openjdk.java.net/browse/JDK-7146776, the `URLStreamHandler` in >> its `getHostAddress` is incorrectly synchronizing on the `URLStreamHandler` >> instance, instead of

Re: RFR: 8257736: InputStream from BodyPublishers.ofInputStream() leaks when IOE happens [v5]

2021-01-14 Thread Chris Hegarty
On Thu, 14 Jan 2021 02:25:25 GMT, Yasumasa Suenaga wrote: >> `InputStream` from `BodyPublishers.ofInputStream()` is usually closed when >> the stream reaches EOF. However IOE handler returns without closing. >> >> I confirmed this problem in `BodyPublishers.ofInputStream()`, but I think >>

Re: RFR: 8259699: Reduce char[] copying in URLEncoder.encode(String, Charset) [v3]

2021-01-14 Thread Chris Hegarty
On Thu, 14 Jan 2021 12:48:18 GMT, Сергей Цыпанов wrote: >> Instead of allocating a copy of underlying array via >> `CharArrayWriter.toCharArray()` and passing it to constructor of String >> String str = new String(charArrayWriter.toCharArray()); >> we could call `toString()` method >> String

Re: RFR: 8259631: Reapply pattern match instanceof use in HttpClientImpl

2021-01-13 Thread Chris Hegarty
On Tue, 12 Jan 2021 16:05:01 GMT, Aleksei Efimov wrote: > Hi, > > The proposed change adds back [1] `instanceof` pattern match use to > `HttpClientImpl` class. It was previously removed by > [JDK-8258696](https://bugs.openjdk.java.net/browse/JDK-8258696) due to docs > build failure. > >

Re: RFR: 8258422: Cleanup unnecessary null comparison before instanceof check in java.base [v4]

2021-01-08 Thread Chris Hegarty
On Fri, 8 Jan 2021 13:20:38 GMT, Aleksei Efimov wrote: >> This issue is blocked by [8258657][1]. It should not be integrated until >> after 8258657 has been resolved. The JIRA issues have been linked up to >> reflect this. >> >> [1]: https://bugs.openjdk.java.net/browse/JDK-8258657 > >

Re: [JDK-8257080] Java does not try all DNS results when opening a socket

2020-12-22 Thread Chris Hegarty
,int). -Chris. [1] https://bugs.openjdk.java.net/browse/JDK-8170568 [2] https://mail.openjdk.java.net/pipermail/net-dev/2019-April/012371.html [3] https://tools.ietf.org/html/rfc6555 > On 17 Dec 2020, at 14:39, Chris Hegarty wrote: > > Looping in a prior relevant issue in JIRA: &

Re: RFR: 8258422: Cleanup unnecessary null comparison before instanceof check in java.base [v4]

2020-12-19 Thread Chris Hegarty
On Thu, 17 Dec 2020 13:16:31 GMT, Aleksei Efimov wrote: >> Andrey Turbanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8258422: Cleanup unnecessary null comparison before instanceof check in >> java.base >> take advantage of

Integrated: 8258696: Temporarily revert use of pattern match instanceof until docs-reference is fixed

2020-12-18 Thread Chris Hegarty
On Fri, 18 Dec 2020 16:54:59 GMT, Chris Hegarty wrote: > Temporarily revert use of pattern match instanceof construct until > docs-reference is fixed, see JDK-8258657. > > ... > Generating REFERENCE_API javadoc for 21 modules > > if (delegate instanceof Ex

RFR: 8258696: Temporarily revert use of pattern match instanceof until docs-reference is fixed

2020-12-18 Thread Chris Hegarty
Temporarily revert use of pattern match instanceof construct until docs-reference is fixed, see JDK-8258657. ... Generating REFERENCE_API javadoc for 21 modules if (delegate instanceof ExecutorService service) { ^ (use

Re: RFR: 8258582: HttpClient: the HttpClient doesn't explicitly shutdown its default executor when stopping.

2020-12-17 Thread Chris Hegarty
On Thu, 17 Dec 2020 14:51:44 GMT, Daniel Fuchs wrote: > Hi, > > Please find an almost trivial fix for: > 8258582: HttpClient: the HttpClient doesn't explicitly shutdown its default > executor when stopping. > > The HttpClient should shutdown his executor when stopping, when the executor >

Re: [JDK-8257080] Java does not try all DNS results when opening a socket

2020-12-17 Thread Chris Hegarty
Looping in a prior relevant issue in JIRA: https://bugs.openjdk.java.net/browse/JDK-8170568 - Improve address selection for network clients -Chris. > On 17 Dec 2020, at 13:45, Daniel Fuchs wrote: > > Hi Simone, > > We are investigating introducing a Service Provider interface > which would

Re: RFR: 8258422: Cleanup unnecessary null comparison before instanceof check in java.base [v4]

2020-12-17 Thread Chris Hegarty
On Wed, 16 Dec 2020 10:32:12 GMT, Andrey Turbanov wrote: >> 8258422: Cleanup unnecessary null comparison before instanceof check in >> java.base > > Andrey Turbanov has updated the pull request incrementally with one > additional commit since the last revision: > > 8258422: Cleanup

Re: RFR: 8258422: Cleanup unnecessary null comparison before instanceof check in java.base [v3]

2020-12-16 Thread Chris Hegarty
On Wed, 16 Dec 2020 09:20:09 GMT, Andrey Turbanov wrote: >> 8258422: Cleanup unnecessary null comparison before instanceof check in >> java.base > > Andrey Turbanov has updated the pull request incrementally with one > additional commit since the last revision: > > 8258422: Cleanup

Re: RFR: 8258422: Cleanup unnecessary null comparison before instanceof check in java.base

2020-12-15 Thread Chris Hegarty
On Sat, 31 Oct 2020 19:37:10 GMT, Stuart Marks wrote: >> I believe this changes is useful and still actual: >> 1. improve code to make it easier to read. >> 2. performance should be improved a bit too > > I’ll see if I can get somebody to take a look at this. This seems like a reasonable

Re: RFR: 8257736: InputStream from BodyPublishers.ofInputStream() leaks when IOE happens [v3]

2020-12-10 Thread Chris Hegarty
On Sat, 5 Dec 2020 04:54:27 GMT, Yasumasa Suenaga wrote: >> `InputStream` from `BodyPublishers.ofInputStream()` is usually closed when >> the stream reaches EOF. However IOE handler returns without closing. >> >> I confirmed this problem in `BodyPublishers.ofInputStream()`, but I think >>

Re: RFR: 8256459: java/net/httpclient/ManyRequests.java and java/net/httpclient/LineBodyHandlerTest.java fail infrequently with java.net.ConnectException: Connection timed out: no further information

2020-12-09 Thread Chris Hegarty
On Wed, 9 Dec 2020 18:50:50 GMT, Daniel Fuchs wrote: >> Hi, >> >> Please find here a changeset that fixes the infrequent (but annoying) test >> failures >> caused by unexpected ConnectionException "Connection timed out: no further >> information" >> which have been observed to occur on some

Re: RFR: 8256459: java/net/httpclient/ManyRequests.java and java/net/httpclient/LineBodyHandlerTest.java fail infrequently with java.net.ConnectException: Connection timed out: no further information

2020-12-09 Thread Chris Hegarty
On Wed, 9 Dec 2020 15:37:42 GMT, Daniel Fuchs wrote: > Hi, > > Please find here a changeset that fixes the infrequent (but annoying) test > failures > caused by unexpected ConnectionException "Connection timed out: no further > information" > which have been observed to occur on some

Re: RFR: 8256459: java/net/httpclient/ManyRequests.java and java/net/httpclient/LineBodyHandlerTest.java fail infrequently with java.net.ConnectException: Connection timed out: no further information

2020-12-09 Thread Chris Hegarty
On Wed, 9 Dec 2020 15:37:42 GMT, Daniel Fuchs wrote: > Hi, > > Please find here a changeset that fixes the infrequent (but annoying) test > failures > caused by unexpected ConnectionException "Connection timed out: no further > information" > which have been observed to occur on some

Re: RFR: JDK-8257401: Use switch expressions in jdk.internal.net.http and java.net.http [v4]

2020-12-02 Thread Chris Hegarty
On Wed, 2 Dec 2020 09:42:09 GMT, Kartik Ohri wrote: >> Hi! >> Kindly review this patch to replace switch statements with switch >> expressions (where it makes sense) in the http client modules. The rationale >> is to improve readability of the code. >> Regards, >> Kartik > > Kartik Ohri has

Re: RFR: 8255675: Typo in java.net.HttpURLConnection

2020-11-23 Thread Chris Hegarty
On Tue, 17 Nov 2020 07:50:10 GMT, ANUPAM DEV wrote: > 8255675: Typo in java.net.HttpURLConnection Marked as reviewed by chegar (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/1250

  1   2   3   4   5   6   7   8   9   10   >