RFR: 8302845: Replace finalizer usage in JNDI DNS provider with Cleaner [v2]

Alan Bateman alanb at openjdk.org
Sat May 6 12:50:14 UTC 2023


On Sat, 6 May 2023 09:50:06 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

> I believe this is not quite right. The Cleanable returned by the `register` method should be saved in a final field. And close() below should call `Cleanable::clean` instead of `udpChannelSelector.close()`

Selector::close is idempotent so it doesn't really matter but your approach would mean the cleanable is deregistered when the API is used correctly, which is good thing.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13837#discussion_r1186692874


More information about the core-libs-dev mailing list