RFR 8220475: Malformed copyright header in LinuxSocketOptions.java, MacOSXSocketOptions.java and MacOSXSocketOptions.c

2019-03-13 Thread Chris Hegarty
Trivially, there should be a comma after the year. Just add it. diff --git a/src/jdk.net/linux/classes/jdk/net/LinuxSocketOptions.java b/src/jdk.net/linux/classes/jdk/net/LinuxSocketOptions.java --- a/src/jdk.net/linux/classes/jdk/net/LinuxSocketOptions.java +++ b/src/jdk.net/linux/classes/jdk/ne

Re: RFR 8220475: Malformed copyright header in LinuxSocketOptions.java, MacOSXSocketOptions.java and MacOSXSocketOptions.c

2019-03-13 Thread Daniel Fuchs
Looks good Chris! -- daniel On 13/03/2019 12:09, Chris Hegarty wrote: Trivially, there should be a comma after the year. Just add it.

Re: RFR 8220475: Malformed copyright header in LinuxSocketOptions.java, MacOSXSocketOptions.java and MacOSXSocketOptions.c

2019-03-13 Thread Alan Bateman
On 13/03/2019 12:09, Chris Hegarty wrote: Trivially, there should be a comma after the year. Just add it. Looks okay.

Re: RFR: 8220083: Use InetAddress.getLoopbackAddress() in place of 127.0.0.1 for some tests

2019-03-13 Thread Arthur Eubanks
Hi Vyom, Sorry, the change already went in. I can do this in a followup change if you'd like. On Tue, Mar 12, 2019 at 8:04 PM Vyom Tiwari wrote: > Hi Arthur, > > Changes looks good to me, one minor comment, in HTTPTestServer.java we > can avoid new local variable (InetAddress address) . > > Th

RFR: 8220585: Incorrect code in MulticastSocket sample code

2019-03-13 Thread Arthur Eubanks
Hi, A fix for some sample code in MulticastSocket, which assumed that String.length() == String.getBytes().length, which is not true for non-ASCII Strings. http://cr.openjdk.java.net/~aeubanks/8220585/webrev.00

RFR 8220598: Malformed copyright year range in a few files in java.base

2019-03-13 Thread Chris Hegarty
Trivially, there should be a comma after the year. Just add it. $ hg diff src/java.base/share/classes/jdk/ src/java.base/share/classes/sun diff --git a/src/java.base/share/classes/jdk/internal/util/ArraysSupport.java b/src/java.base/share/classes/jdk/internal/util/ArraysSupport.java --- a/src/ja

8207846 Generalize the jdk.net.includeInExceptions security property: documentation?

2019-03-13 Thread Horváth Péter Gergely
Hi All, I think having the enhanced reporting of socket connection failures driven by "jdk.net.includeInExceptions" property is a huge step forward with regards to the ability to debug Java networking applications. For me however one piece seems to be missing: I am not sure if there is any kind o

Re: RFR 8220598: Malformed copyright year range in a few files in java.base

2019-03-13 Thread Daniel Fuchs
Looks good to me Chris! cheers, -- daniel On 13/03/2019 17:04, Chris Hegarty wrote: Trivially, there should be a comma after the year. Just add it.

Re: RFR 8220598: Malformed copyright year range in a few files in java.base

2019-03-13 Thread Lance Andersen
+1 > On Mar 13, 2019, at 1:04 PM, Chris Hegarty wrote: > > Trivially, there should be a comma after the year. Just add it. > > > $ hg diff src/java.base/share/classes/jdk/ src/java.base/share/classes/sun > diff --git a/src/java.base/share/classes/jdk/internal/util/ArraysSupport.java > b/src/ja

Re: RFR: 8220585: Incorrect code in MulticastSocket sample code

2019-03-13 Thread Martin Buchholz
Looks good to me. On Wed, Mar 13, 2019 at 9:34 AM Arthur Eubanks wrote: > Hi, > > A fix for some sample code in MulticastSocket, which assumed that > String.length() == String.getBytes().length, which is not true for > non-ASCII Strings. > > http://cr.openjdk.java.net/~aeubanks/8220585/webrev.00

Re: RFR: 8220585: Incorrect code in MulticastSocket sample code

2019-03-13 Thread Chris Hegarty
Arthur, On 13/03/2019 16:32, Arthur Eubanks wrote: Hi, A fix for some sample code in MulticastSocket, which assumed that String.length() == String.getBytes().length, which is not true for non-ASCII Strings. http://cr.openjdk.java.net/~aeubanks/8220585/webrev.00 Looks good. Thanks. -Chris

Re: RFR: 8220083: Use InetAddress.getLoopbackAddress() in place of 127.0.0.1 for some tests

2019-03-13 Thread Martin Buchholz
On Tue, Mar 12, 2019 at 12:21 PM Chris Hegarty wrote: > > > Just curious, what tests did you run and under what environment? > > I ran all java/net, sun/net, com/sun/net/, and some nio. I'm have a bit > of a hacky environment: a JDK build with IPV6_V6ONLY set to 1, and > preferIPv6Addresses effec

Regarding 8220575: Correctly format test URI's that contain a retrieved IPv6 address

2019-03-13 Thread Chris Hegarty
I filed the 8220575 [1] that tracks "Correctly format test URI's that contain a retrieved IPv6 address" Regarding fixing tests that incorrectly use IPv6 addresses in URL's or URI's, without enclosing the address within '[' and ']' ( square brackets ). These IPv6 addresses typically come from eith

Re: Regarding 8220575: Correctly format test URI's that contain a retrieved IPv6 address

2019-03-13 Thread Daniel Fuchs
Hi Chris, On 13/03/2019 17:32, Chris Hegarty wrote: I think that is most cases it should be possible to just replace the use of `getHostAddress` with `getHostName`. This defers the actual lookup to the system configured name service ( rather than trying to encode IPv6 addresses in the test ) I

Re: Regarding 8220575: Correctly format test URI's that contain a retrieved IPv6 address

2019-03-13 Thread Daniel Fuchs
Hi Arthur, On 13/03/2019 17:43, Arthur Eubanks wrote: Martin suggested looping through all available loopback addresses rather than hardcoding them. In that case we'll need helper test functions to return loopback addresses (and test that it actually returns all available loopback addresses).

Re: Regarding 8220575: Correctly format test URI's that contain a retrieved IPv6 address

2019-03-13 Thread Chris Hegarty
Daniel, On 13/03/2019 18:22, Daniel Fuchs wrote: Hi Chris, On 13/03/2019 17:32, Chris Hegarty wrote: I think that is most cases it should be possible to just replace the use of `getHostAddress` with `getHostName`. This defers the actual lookup to the system configured name service ( rather tha

Re: RFR: 8220083: Use InetAddress.getLoopbackAddress() in place of 127.0.0.1 for some tests

2019-03-13 Thread Chris Hegarty
Martin, On 13/03/2019 17:29, Martin Buchholz wrote: ... The difficulty of testing networking environments is an impediment to progress. Chris, you might want to publish your hacky changes as an experimental patch in cr.openjdk. I will do this, but, as I said, it is just a hack. At Google

Re: RFR: 8220083: Use InetAddress.getLoopbackAddress() in place of 127.0.0.1 for some tests

2019-03-13 Thread Martin Buchholz
On Wed, Mar 13, 2019 at 11:49 AM Chris Hegarty wrote: > > > At Google, we have our own hacks to test ipv6-only environments, based > > on either LD_PRELOAD or eBPF (but it would take work to share them even > > in minimally functional form) > > Maybe I can produce something similar and publish it

Re: RFR 8220598: Malformed copyright year range in a few files in java.base

2019-03-13 Thread Weijun Wang
+1 (on the security class). Thanks, Max > On Mar 14, 2019, at 1:10 AM, Lance Andersen wrote: > > +1 >> On Mar 13, 2019, at 1:04 PM, Chris Hegarty wrote: >> >> Trivially, there should be a comma after the year. Just add it. >> >> >> $ hg diff src/java.base/share/classes/jdk/ src/java.base/sh

Re: Regarding 8220575: Correctly format test URI's that contain a retrieved IPv6 address

2019-03-13 Thread Martin Buchholz
On Wed, Mar 13, 2019 at 11:24 AM Daniel Fuchs wrote: > > jshell> InetAddress.getLoopbackAddress().getHostName() > $7 ==> "localhost" > > jshell> InetAddress.getAllByName("localhost"); > $8 ==> InetAddress[3] { >localhost/127.0.0.1, >localhost/0:0:0:0:0:0:0:1, >