On 24/09/2019 16:01, Patrick Concannon wrote:
Hi,


Would it be possible to have both my fix JDK-8230946, and CSR JDK-8231305, reviewed?

This fix and CSR addresses the javadocs for DatagramSocket::receive, DatagramChannel::connect and DatagramChannel::receive and aims at clarifying the Security Manager behaviour on a connected DatagramSocket/DatagramChannel.

webrev: http://cr.openjdk.java.net/~pconcannon/8230946/webrevs/webrev.03/

CSR: https://bugs.openjdk.java.net/browse/JDK-8231305
The update to DatagramChannel.connect looks okay.

In DatagramSocket.receive then I wonder if the "On a send operation, ..." sentence is needed as the send method already specifies IAE.

The clarification to DatagramSocket.receive on how it behaves when there is a security manager and not connected may require some adjusting to DatagramChannel's receive spec too. The specification is that a SecurityException is thrown but the implementation behavior is to drop the datagram. Separate issue but we should try to fix that while in the area. I also note that both DatagramSocket and DatagramChannel may have to bind on first usage which may involve a permission check that we should ensure all succeeds.

-Alan.

Reply via email to