RFR: 8302845: Replace finalizer usage in JNDI DNS provider with Cleaner
Alan Bateman
alanb at openjdk.org
Fri May 5 18:16:22 UTC 2023
On Fri, 5 May 2023 17:25:38 GMT, Aleksei Efimov <aefimov at openjdk.org> wrote:
> JNDI `DnsClient` has a finalize method to close its internal datagram channel selector.
> The change proposed here replaces it with a cleaner to close the selector once the `DnsClient`
> instance becomes phantom reachable.
>
> The change was tested with `jdk-tier1` to `jdk-tier3` test sets which showed no failures.
src/jdk.naming.dns/share/classes/com/sun/jndi/dns/DnsClient.java line 163:
> 161: }
> 162: // register a cleaning action to close the channel
> 163: // selector when this DNS client becomes phantom reachable
The change looks okay, it's just the comment here isn't quite right, it should say "to close the Selector when ...".
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13837#discussion_r1186377852
More information about the core-libs-dev
mailing list