On Tue, 30 Nov 2021 13:26:30 GMT, Kevin Rushforth <k...@openjdk.org> wrote:
> 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. The changes look good to me. I can see that the warning is issued when the gtk version 2 is specified and not done otherwise. ------------- Marked as reviewed by pbansal (Committer). PR: https://git.openjdk.java.net/jfx/pull/685