On Mon, 3 Aug 2026 17:38:22 GMT, Alexander Zvegintsev <[email protected]> wrote:
>> While working on [JDK-8379673](https://bugs.openjdk.org/browse/JDK-8379673), >> I noticed that an `Error` thrown by the test is being swallowed in a `catch` >> block: >> >> >> try { >> EventQueue.invokeAndWait(new Runnable() { >> public void run() { >> repaint(); >> checkFSDisplay(fs); // throws Error on failure >> } >> }); >> } catch (InvocationTargetException | InterruptedException ex) { >> ex.printStackTrace(); >> } >> >> >> There are a few other issues with the test: >> >> * Robot creation failure is ignored. >> * The screenshot is taken immediately after `repaint()`. As a result, the >> test may capture the frame before rendering has actually completed. >> * A separate thread is not really necessary. >> * `-Dsun.java2d.d3d=false` test run is only applicable for Windows. >> >> >> --- >> The changeset fixes the issues described above, simplifies the test, and >> limits the `-Dsun.java2d.d3d=false` test run to Windows only. >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Alexander Zvegintsev has updated the pull request incrementally with one > additional commit since the last revision: > > Error -> RuntimeException Marked as reviewed by psadhukhan (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/32168#pullrequestreview-4870537190
