On Sun, 13 Sep 2026 12:29:43 GMT, Marius Hanl <[email protected]> wrote:
>> This PR integrates the `Platform` functionality into `PlatformUtil`, so that >> we only have one place where we do OS stuff. And can delete `Platform`. >> >> Something that was first discussed in >> https://github.com/openjdk/jfx/pull/1864 and I also saw when I did the >> cleanup some months ago in PR https://github.com/openjdk/jfx/pull/2190. >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Marius Hanl has updated the pull request incrementally with three additional > commits since the last revision: > > - rename to GlassPlatform, improve code a bit > - revert back > - Revert "Move PlatformUtil from javafx.base to javafx.graphics" > > This reverts commit e41e8ed504b9ac54d8be7646108151f5aeff07d3. I like the name `GlassPlatform`, this avoids identically named classes. The JBS/PR title might need to updated to refer to the new "GlassPlatform"? modules/javafx.graphics/src/main/java/com/sun/glass/ui/PlatformFactory.java line 39: > 37: if (instance == null) { > 38: try { > 39: String platform = GlassPlatform.determinePlatform(); minor: maybe fix the missing space in L40 below? modules/javafx.graphics/src/main/java/com/sun/glass/ui/View.java line 52: > 50: /* By default accessibility is enabled for Mac 10.9 or greater > and Windows 7 or greater. */ > 51: try { > 52: String platform = GlassPlatform.determinePlatform(); This code is basically a remnant from removing `doPrivileged()`. What do you think of: - moving this code to `GlassPlatform` - removing the `Supplier ... get()` since it's not needed anymore modules/javafx.graphics/src/main/java/com/sun/glass/ui/View.java line 56: > 54: String minor = > System.getProperty("os.version").replaceFirst("\\d+\\.(\\d+).*", "$1"); > 55: int v = Integer.parseInt(major) * 100 + > Integer.parseInt(minor); > 56: return (platform.equals(GlassPlatform.MAC) && v >= 1009) || minor: do the integer comparison first ------------- PR Review: https://git.openjdk.org/jfx/pull/2299#pullrequestreview-5201284820 PR Review Comment: https://git.openjdk.org/jfx/pull/2299#discussion_r4008195973 PR Review Comment: https://git.openjdk.org/jfx/pull/2299#discussion_r4008227101 PR Review Comment: https://git.openjdk.org/jfx/pull/2299#discussion_r4008233139
