RFR: 8273089: Deprecate JavaFX GTK 2 library for removal
Kevin Rushforth
kcr at openjdk.java.net
Tue Nov 30 13:31:28 UTC 2021
This PR deprecates the JavaFX glass GTK 2 library for removal. Since there isn't an associated API, the mechanism for doing this is to print a "deprecated for removal" warning message when the `glassgtk2` library it is loaded. A message is printed regardless of why the GTK 2 library was loaded, which can happen for one of the following reasons:
1. The application or end user has explicitly requested GTK 2 using the `jdk.gtk.version` system property.
2. Another native library has already loaded the GTK 2 library (an application cannot load both the GTK 2 and GTK 3 libraries in the same process)
3. As a fallback if the gtk3 libraries are not available on the system.
The warning messages are patterned after the security manager deprecation messages added as part of [JEP 411](https://openjdk.java.net/jeps/411).
I added two system tests, one that sets the `jdk.gtk.version` system property to `2` and verifies that the warning message is printed, and one that doesn't set `jdk.gtk.version` and verifies that no warning message is printed.
-------------
Commit messages:
- 8273089: Deprecate JavaFX GTK 2 library for removal
Changes: https://git.openjdk.java.net/jfx/pull/685/files
Webrev: https://webrevs.openjdk.java.net/?repo=jfx&pr=685&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8273089
Stats: 221 lines in 4 files changed: 221 ins; 0 del; 0 mod
Patch: https://git.openjdk.java.net/jfx/pull/685.diff
Fetch: git fetch https://git.openjdk.java.net/jfx pull/685/head:pull/685
PR: https://git.openjdk.java.net/jfx/pull/685
More information about the openjfx-dev
mailing list