RFR: 8305083: Remove finalize() from test/hotspot/jtreg/vmTestbase/nsk/share/ and /jpda that are used in serviceability/dcmd/framework tests

David Holmes dholmes at openjdk.org
Thu Apr 13 06:47:32 UTC 2023


On Wed, 12 Apr 2023 19:16:14 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

> The interaction of Finalizable, FinalizableObject, Finalizer, and FinalizerThread is hard to follow,

These classes implement a cleanup-at-vm-exit mechanism, which uses `finalize` as the cleanup method. It is unclear if the classes that implement `FinalizableObject` can actually get cleaned up before VM exit through normal GC and execution of finalizers. Simply adding a Cleaner does not provide the cleanup-at-vm-exit functionality. You need to rename Finaliz* to Clean* and keep all these classes, as well as adding a Cleaner - which should be done as part of CleanableObject.

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

PR Comment: https://git.openjdk.org/jdk/pull/13420#issuecomment-1506435408


More information about the serviceability-dev mailing list