Thanks for your comments.

Updated version of the patch available as 
http://cr.openjdk.java.net/~sviswanathan/Vladimir/8243099/webrev.07/
The exception part for the setOption method was updated
+                } else if (option == SO_INCOMING_NAPI_ID) {
+                    if (!incomingNapiIdOptSupported)
+                        throw new UnsupportedOperationException("Attempt to 
set unsupported option " + option);
+                    else
+                        throw new IOException("Attempt to set read only option 
" + option);

It required to update the method's description. As side effect some application 
may report compile error for the 'setOption' method usage while one more
exception should be added to processing.

The Javadoc and the ExtOptionNAPITest.java were updated to use IOE instead of 
UOE.

Tests "test/jdk/jdk/net/Sockets test/jdk/java/net/SocketOption/AfterClose.java 
test/jdk/java/nio/channels/etc/PrintSupportedOptions.java" passed on the 
RHEL8 (with NAPI support) and the RHEL7.7 (without NAPI support).

 Thanks, Vladimir

-----Original Message-----
From: Alan Bateman <alan.bate...@oracle.com> 
Sent: Friday, May 1, 2020 12:22 PM
To: Ivanov, Vladimir A <vladimir.a.iva...@intel.com>; OpenJDK Network Dev list 
<net-dev@openjdk.java.net>
Subject: Re: RFR 15 8243099: SO_INCOMING_NAPI_ID support

On 01/05/2020 19:44, Ivanov, Vladimir A wrote:
> Thanks for your comments.
> The patch with updated doc available as: 
> http://cr.openjdk.java.net/~sviswanathan/Vladimir/8243099/webrev.06/
>
I think the javadoc is in good shape now but we do need to address Chris's 
point that the exception thrown when attempting to set this socket option 
shouldn't UOE (as the option will be in the set returned by supportedOptions). 
I think this reduces the choice down to just IOException. Not ideal but there 
are several examples where IOE is thrown when a socket option can't be set.  
For the API docs this means changing it to say that IOException is thrown. For 
the implementation is means that IOE is thrown when incomingNapiIdSupported is 
true and UOE when it is false. If we can get agreement on this in the next few 
days then I think it should be create to submit the CSR.

-Alan

Reply via email to