New candidate JEP: 421: Deprecate Finalization for Removal

- liangchenblue at
Tue Nov 2 14:00:15 UTC 2021

On a side note, will the actual removal of finalization become a
dependency of the actual removal of the security manager? I recall
when the security manager was deprecated for removal, developers
pointed out that there can be security risks with finalization in the
mailing list.

On Mon, Nov 1, 2021 at 2:58 PM <mark.reinhold at> wrote:
>   Summary: Deprecate finalization for removal in a future
>   release. Finalization remains enabled by default for now, but can
>   be disabled to facilitate early testing. In a future release it
>   will be disabled by default, and in a later release it will be
>   removed. Maintainers of libraries and applications that rely upon
>   finalization should consider migrating to other resource management
>   techniques such as the try-with-resources statement and cleaners.
> - Mark

More information about the jdk-dev mailing list