On Mon, 3 Aug 2026 05:03:11 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).

This pull request has now been integrated.

Changeset: 52cd87fe
Author:    Alexander Zvegintsev <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/52cd87fef6f3a4f017faf9efbdfa657413130862
Stats:     96 lines in 1 file changed: 21 ins; 48 del; 27 mod

8389589: [TEST_BUG] java/awt/FullScreen/SetFSWindow/FSFrame.java hides failure 
by swallowing exception

Reviewed-by: psadhukhan, serb

-------------

PR: https://git.openjdk.org/jdk/pull/32168

Reply via email to