> ImageIO objects, like ImageReader, ImageWrite, ImageInputStream and 
> ImageOutputStream, should implement AutoClosable.
> 
> There is a risk of keeping resources opened longer than needed (or even run 
> into a resource leak with long running processes) as the user cannot use 
> try-with-resources currently. The fact that there is a `dispose()` method to 
> be called is easily missed, as people tend to look for `close()`.
> 
> This is not a big change, but it is useful for those working with ImageIO.

Markus KARG has updated the pull request incrementally with one additional 
commit since the last revision:

  Closeable instead of AutoCloseable

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/12098/files
  - new: https://git.openjdk.org/jdk/pull/12098/files/f5a5f091..4aceea1b

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=12098&range=04
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=12098&range=03-04

  Stats: 4 lines in 2 files changed: 2 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/12098.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/12098/head:pull/12098

PR: https://git.openjdk.org/jdk/pull/12098

Reply via email to