[jdk8u-dev] Integrated: 8274893: Update java.desktop classes to use try-with-resources
Timofei Pushkin
tpushkin at openjdk.org
Wed Feb 18 01:39:28 UTC 2026
On Mon, 1 Sep 2025 07:36:51 GMT, Timofei Pushkin <tpushkin at openjdk.org> wrote:
> Backport of [JDK-8274893](https://bugs.openjdk.org/browse/JDK-8274893) for parity with Oracle's JDK 8u461.
>
> Resolved conflicts:
> - `jdk/src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java`
> - Missing JDK-8271456: `"ISO-8859-1"` string is used instead of `ISO_8859_1` enum constant
> - Missing JDK-8041679: `StringBuffer` is used instead of `StringBuilder`
> - `jdk/src/share/classes/javax/swing/text/html/HTMLEditorKit.java`
> - Missing JDK-8271456: `"ISO-8859-1"` string is used instead of `ISO_8859_1` enum constant
> - `jdk/src/share/classes/com/sun/media/sound/StandardMidiFileWriter.java`
> - Missing JDK-8143909: no `Objects.requireNonNull(...)` in this version
> - `jdk/src/solaris/classes/sun/awt/motif/MFontConfiguration.java`
> - Missing JDK-8054834: imports from `sun.font` package are still needed in this file
> - `jdk/src/share/classes/com/sun/imageio/plugins/png/PNGImageReader.java`
> - Missing JDK-8080835: use `IOUtils.readAllBytes(InputStream is)` instead of the missing `InputStream.readAllBytes()`
> - Missing JDK-7196163: try-with-resources cannot be used with pre-existing variables — fell back to try-finally in such cases
>
> Testing: GitHub CI, `jdk_imageio` test group locally (headless linux/arm64)
This pull request has now been integrated.
Changeset: d043a240
Author: Timofei Pushkin <tpushkin at openjdk.org>
Committer: Andrew John Hughes <andrew at openjdk.org>
URL: https://git.openjdk.org/jdk8u-dev/commit/d043a240c7c562c01932479433732b4461f48ee8
Stats: 264 lines in 24 files changed: 46 ins; 113 del; 105 mod
8274893: Update java.desktop classes to use try-with-resources
Reviewed-by: andrew
Backport-of: 70c6df6be431fe11c5441986ed04040f9ec3b750
-------------
PR: https://git.openjdk.org/jdk8u-dev/pull/686
More information about the jdk8u-dev
mailing list