[jdk17u-dev] RFR: 8274893: Update java.desktop classes to use try-with-resources

Goetz Lindenmaier goetz at openjdk.org
Thu Feb 20 10:21:29 UTC 2025


I backport this for parity with 17.0.15-oracle.
I hesitated a while to backport this Enhancements, but I think it's better to 
go along with Oracle here, too.  Especially as it's an almost clean backport.

Copyright:
src/java.desktop/share/classes/com/sun/media/sound/AudioFileSoundbankReader.java
src/java.desktop/share/classes/com/sun/media/sound/JARSoundbankReader.java

src/java.desktop/share/classes/javax/imageio/ImageIO.java
The try-finally statement catches an exception in 17, which is not
present in the original change.
This is becasue "(8272998)[https://bugs.openjdk.org/browse/JDK-8272998]: ImageIO.read() throws incorrect exception type" was
already backported. Trivial resolve.

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

Commit messages:
 - Backport 70c6df6be431fe11c5441986ed04040f9ec3b750

Changes: https://git.openjdk.org/jdk17u-dev/pull/3283/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk17u-dev&pr=3283&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8274893
  Stats: 225 lines in 24 files changed: 27 ins; 98 del; 100 mod
  Patch: https://git.openjdk.org/jdk17u-dev/pull/3283.diff
  Fetch: git fetch https://git.openjdk.org/jdk17u-dev.git pull/3283/head:pull/3283

PR: https://git.openjdk.org/jdk17u-dev/pull/3283


More information about the jdk-updates-dev mailing list