adding rsockets support into JDK
yingqi.lu at intel.com
Tue Nov 20 04:06:18 UTC 2018
Thank you for your quick feedback. I have uploaded version 18 of the patch at http://cr.openjdk.java.net/~ylu/8195160.18/
In this version, I have changed following items according to your suggestions:
1. src/java.base/share/classes/module-info.java: removed "opens java.net to jdk.net" at the end of the file.
2. Removed all the changes to src/jdk.net/share/classes/jdk/net/Sockets.java
3. In all the test cases, using "jtreg.SkippedException" instead of simply return to skip the tests when rsocket is not available.
4. In terms of adding -Djava.net.preferIPv4Stack=true for all the tests, I tested couple test cases without the flag and they return error. I think the reason is that Java uses IPv6 by default if kernel supports it. However rsocket does not support IPv4-mapped addresses. That is the reason why the flag is needed. Please let me know if there is anything I miss here though.
>From: Chris Hegarty [mailto:chris.hegarty at oracle.com]
>Sent: Monday, November 19, 2018 10:17 AM
>To: Lu, Yingqi <yingqi.lu at intel.com>; Brian Burkhalter
><brian.burkhalter at oracle.com>; Alan Bateman <Alan.Bateman at oracle.com>
>Cc: Viswanathan, Sandhya <sandhya.viswanathan at intel.com>; Aundhe,
>Shirish <shirish.aundhe at intel.com>; nio-dev at openjdk.java.net; Kaczmarek,
>Eric <eric.kaczmarek at intel.com>
>Subject: Re: adding rsockets support into JDK
>On 19/11/18 17:25, Lu, Yingqi wrote:
>> Hi Alan/Chris/Brian,
>> Thank you very much for your help on finalizing the CSR. Really appreciate!
>> I modified JEP accordingly at
>> The most recent version of the patch is available at
>Still reviewing, some passing comments:
> I don't think that the `opens java.net to jdk.net` is still needed.
>- The changes in src/jdk.net/share/classes/jdk/net/Sockets.java can be
>- The tests all follow a pattern similar to the following:
> if (!RsocketTest.isRsocketAvailable())
> , which is fine. More recently we've been preferring to throw a jtreg
> specific exception to indicate that the test was skipped, rather than
> run. The exception is jtreg.SkippedException. For example look at the
> usage in PromiscuousIPv6 .
>- Must the tests be run with `-Djava.net.preferIPv4Stack=true` ? I
> understand that IPv6 is not supported in the rsocket implementation,
> but just curious if the system property is strictly needed?
More information about the nio-dev