RFR: 8365292: Remove javax.imageio.spi.ServiceRegistry.finalize() [v2]
Phil Race
prr at openjdk.org
Wed Aug 20 20:36:21 UTC 2025
> Remove javax.imageio.spi.ServiceRegistry.finalize() since it is deprecated for removal.
> The impact of this should be minimal. The IIORegistry will now be a singleton - which it already was
> in practice since Applets are no longer supported. Since it is a singleton, it will persist for the life
> of the VM, so will never be garbage collected.
> A test that verifies one per-AppContext is now obsolete, and is deleted, and there's no good reason to make it a negative test, since in due course AppContext itself will be deleted and is un-used today except in tests.
>
> Since JDK 9, ServiceRegistry has supported only Image I/O specified providers, and since the IIORegistry does this,
> in practice there is very little reason for an application to create instances or subclasses of it.
> And even if they do, typically like IIORegistry, they be used for the life time of the application.
> And if they are collected, without calling ServiceRegistry.deregisterAll() there may be no impact,
> since only providers that implement RegisterableService will be affected.
>
> See the JBS issue for all the details.
>
> The CSR is ready for review https://bugs.openjdk.org/browse/JDK-8365409
Phil Race has updated the pull request incrementally with one additional commit since the last revision:
8365292
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/26752/files
- new: https://git.openjdk.org/jdk/pull/26752/files/1ba9731d..308e472c
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=26752&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=26752&range=00-01
Stats: 4 lines in 1 file changed: 0 ins; 3 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/26752.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/26752/head:pull/26752
PR: https://git.openjdk.org/jdk/pull/26752
More information about the client-libs-dev
mailing list