RFR: 8276634: Remove `usePlainDatagramSocketImpl` option from the test DatagramChannel/SendReceiveMaxSize.java

Mark Sheppard msheppar at openjdk.java.net
Thu Nov 4 19:44:14 UTC 2021


On Thu, 4 Nov 2021 11:39:15 GMT, Patrick Concannon <pconcannon at openjdk.org> wrote:

> Hi,
> 
> Could someone please review my changes for removing the `usePlainDatagramSocketImpl` option from the test DatagramChannel/SendReceiveMaxSize.java? 
> 
> The option `usePlainDatagramSocketImpl` was not removed during [JDK-8253119 - Remove the legacy PlainSocketImpl and PlainDatagramSocketImpl implementation](https://bugs.openjdk.java.net/browse/JDK-8253119). As these implementations have now been removed from the JDK, tests no longer need to check against it.
> 
> The test `test/jdk/java/nio/channels/DatagramChannel/SendReceiveMaxSize.java` as well as `test/jdk/java/nio/channels/DatagramChannel/ChangingAddress.java` still have this option as its removal was overlooked in the original issue. It can now be removed from both tests. 
> 
> 
> Kind regards,
> Patrick

We might end up talking at cross purposes here!! 
But, it is worth noting that DatagramChannel::socket returns a DatagramSocket and so DatagramChannel encapsulates a DatagramSocket.  As such you'd anticipate that the property would have some influence over the DatagramSocket and its implementation. As of now the property is redundant, but the operational semantics should be the same as previously existed when the property was valid.

I understand your perspective, that with the updated restructuring of the DatagramSocket implementation and it delegation into DatagramChannel implementation there is a form of DatagramChannel implementation encapsulation.

-------------

PR: https://git.openjdk.java.net/jdk/pull/6252


More information about the nio-dev mailing list