8212132: (dc) Remove DatagramChannelImpl finalize method

Daniel Fuchs daniel.fuchs at oracle.com
Thu Oct 24 15:26:54 UTC 2019


Hi Alan,

On 24/10/2019 15:20, Alan Bateman wrote:
> I've updated the proposed change to invoke the register method in the 
> constructor. Also added the @requires to the test so that it is clearer 
> that it doesn't run on Windows. I've left the check for 
> UnixOperatingSystemMXBean in the test as I can't be sure that it can be 
> obtained on some of exotic ports. The new webrev is here:
> 
> http://cr.openjdk.java.net/~alanb/8212132/webrev.02/index.html
> 
> -Alan.

   73     // Used to make native read and write calls
   74     private static NativeDispatcher nd = new DatagramDispatcher();

Is there any reason why `nd` is not final?

nit: in NioSocketImpl:closerFor I'd have a slight preference
      for capturing both `stream` and `fd` in the lambda rather
      than having two lambdas.

Otherwise looks good to me.

best regards,

-- daniel



More information about the nio-dev mailing list