-
Sub-task
-
Resolution: Delivered
-
P4
-
26
Java Object Finalization will be removed from a future JDK version.
In anticipation of this use of this mechanism has been removed from
The class javax.imageio.stream.ImageInputStreamImpl and consequently
from all its subclasses.
This should have no impact on almost all applications since no JDK
provided Image I/O code needed the finalization mechanism.
Applications which use 3rd party Image plugins may be affected in
extremely specific cases where those plugins may fail to flush
the stream and relied on finalization. However that is further limited
to applications which use FileCacheImageOutputStream or
MemoryFileCacheImageOutputStream since these are the only stream
types that would need flushing. It should also be noted that if the
application itself is relying on finalization to flush the stream,
then it cannot know when it may safely close the stream and so very
likely has a bug.
Another scenario is a 3rd party ImageIO stream which acquires native resources.
If the application is relying on finalization to release these it may need to
be updated to explicitly close the ImageIO stream. However this is
also a case in which if the application is not doing this already, it is may be
saving truncated streams.