8212132: (dc) Remove DatagramChannelImpl finalize method

Chris Hegarty chris.hegarty at oracle.com
Wed Oct 23 09:52:14 UTC 2019


> On 22 Oct 2019, at 19:45, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> 
> On 22/10/2019 19:33, Daniel Fuchs wrote:
>> The source changes look good to me Alan!

+ 1. I’ve taken a careful pass over the source changes, since they follow a pattern of leaking `this` in the constructor and implementing a cleaning action with be a lambda, both of which require careful consideration, but the changes LGTM.

>> Regarding the test: I wonder though about using the UnixOperatingSystemMXBean: does that work on Windows?
> It skips on Windows because UnixOperatingSystemMXBean is not available. It would be useful if we had an equivalent MXBean on Windows to track handle usage but I don't think anyone has got around to that. An alternative would be an @requires and the os.family key but it won't make any difference.

The difference is whether the test will be selected to-be-run by jtreg or not. SkippedException is fine, but it seems highly unlikely that UnixOperatingSystemMXBean will every be implemented on Windows, so the test in its current state just doesn’t make sense to be run on non-Unix platforms.   The test is cute, it is a pity that it uses a mechanism that is known to not be supported on Windows.

-Chris.

 



More information about the nio-dev mailing list