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

Afshin Zafari duke at openjdk.org
Tue May 9 09:48:45 UTC 2023


On Sun, 7 May 2023 22:17:56 GMT, David Holmes <dholmes at openjdk.org> wrote:

> This is a tricky issue to solve cleanly and minimally. If every class extended FinalizableObject then all the implementation could go there, but we have to try and split things across FinalizableObject and Finalizable because some classes only implement the interface - this leads to some unfortunate design choices.
> 
> I think a better design for the classes that can't extend FinalizableObject would be for them to contain a FinalizableObject, the cleanup action for which would cleanup the host object. That could allow the removal of the Finalizable interface and simplify the general usage patterns. But that may be going too far for this particular PR ... ?

Please, continue this discussion on the new PR: https://github.com/openjdk/jdk/pull/13884#issuecomment-1539796995. Thanks!

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

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


More information about the serviceability-dev mailing list