On Thu, 23 Jul 2026 11:35:11 GMT, Prasanta Sadhukhan <[email protected]> wrote:
> Test should not run in non-WIndows platform if `sun.java2d.d3d=true` but > `isSupported` call in the test checks for `Boolean.getBoolean(d3d)` which > returns false as it treats "true" as the name of another system property > so we need to use `Boolean.parseBoolean` which returns true and `isSupported` > in that case returns false > so that test should be ignored for non-Windows platform if d3d is true > > Since 1st @run execution already tests for default pipeline in non-Windows > platform, there's no need to run it again if d3d is true > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). test/jdk/javax/swing/JInternalFrame/8069348/bug8069348.java line 126: > 124: String d3d = System.getProperty("sun.java2d.d3d"); > 125: System.out.println("d3d " + d3d); > 126: return !Boolean.parseBoolean(d3d) || getOSType() == > OSType.WINDOWS; The method looked weird, partly because of the name "isSupported() and I wondered it is trying to achieve The only thing it does is prevent this invocation from running on mac & linux @run main/othervm -Dsun.java2d.d3d=true -Dsun.java2d.uiScale=2 bug8069348 presumably because it duplicates this invocation : @run main/othervm -Dsun.java2d.uiScale=2 bug8069348 But it wasn't stopping the same duplication on macOS .. in the ORIGINAL version of the test 44 * @run main/othervm -Dsun.java2d.opengl=true -Dsun.java2d.uiScale=2 bug8069348 was the default until metal came along It was removed by https://hg.openjdk.org/jdk/jdk/rev/3b820b878ebe So some of what isSupported() was trying to achieve is obsoleted. And anywatd3d is the default on windows where we can enable it and specifying the property doesn't change anything. i.e it does not force-enable it. I think to be useful it should have been @run main/othervm -Dsun.java2d.d3d=false -Dsun.java2d.uiScale=2 bug8069348 then WHERE SUPPORTED this default line would be running the d3d case @run main/othervm -Dsun.java2d.uiScale=2 bug8069348 So I suggest to just ditch the isSupported() method and use just the default @run main/othervm -Dsun.java2d.uiScale=2 bug8069348 ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/32024#discussion_r3641473997
