RFR: 8371748: Remove the (empty) ThreadPoolExecutor.finalize() method
Alan Bateman
alanb at openjdk.org
Mon Nov 17 07:12:09 UTC 2025
On Mon, 17 Nov 2025 06:38:21 GMT, ExE Boss <duke at openjdk.org> wrote:
> `super.finalize()` will now have `throws Throwable`, where it previously didn’t, causing a source incompatibility, as seen in `ThreadPoolExecutorSubclassTest`:
Indeed, there is a source compatibility issue here. @bchristi-git Have you did corpus searches to see if there are many cases that extend TPE and invoke super.finalize? I wouldn't any in code written in recent years but maybe there is still older code that would need updating. The overall risk here is low though and the migration would be to just drop the super.finalize() as it doesn't do anything since JDK 11.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28311#issuecomment-3540278101
More information about the core-libs-dev
mailing list