That's the problem with finalization bugs... they are very difficult to find and reproduce.
Finalization can already be turned off with the new VM flag --finalization=disabled. JEP 421 recommends to profile the application with a realistic test suite to record a performance baseline. This can then be compared with the profiling data from a test run with disabled finalization. The JEP contains more details.
Edit: definitely look for finalizers in your own source code already. Even though they might be legacy code, they will likely mean the least amount of trouble to fix since. If you find some in third-party code you are SOL.
2
u/Ancient-Career-2915 May 04 '22
Any thoughts on how much work it will be to verify the removal of Finalization will be ok before an upgrade?