-
Type:
Sub-task
-
Resolution: Delivered
-
Priority:
P4
-
Affects Version/s: 26
-
Component/s: client-libs
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 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 third 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 third 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.
the class [javax.imageio.stream.ImageInputStreamImpl] and 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 third 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 third 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.