RFR: 7001973: java/awt/Graphics2D/CopyAreaOOB.java fails

Sergey Bylokhov serb at openjdk.java.net
Fri Sep 17 08:18:41 UTC 2021


On Mon, 13 Sep 2021 11:32:37 GMT, Masanori Yano <myano at openjdk.org> wrote:

> Could you please review the 7001973 fixes?
> 
> On Windows, CopyAreaOOB.java fails with a blank window. The cause of this problem is that paint() works one time only. Painting area is not guaranteed when showing a window.
> 
> I think this behavior should be removed for purpose of this test (`@summary: Verifies that copyArea() works properly`). Also, this program uses a Robot, but implements waiting logic by itself. This logic should be replaced to Robot API.
> 
> This fix works fine in Windows, so this test can be removed from ProblemList.txt. I don't have a Mac environment, so can someone please confirm that this fix will work on Mac?

Let's check the sequence in the test:
1. Frame created
2. Undecorated property is set
3. peer is created, and native configuration completed
4. frame is moved to the center of the screen
5. frame became visible

It is fine to have a few paint events posted for the code above, my question was why the first CopyArea is ignored? If the awt/java2d is not ready yet to draw/repaint the window that events should not be posted, if it is ready then CopyArea should work, no?

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

PR: https://git.openjdk.java.net/jdk/pull/5491



More information about the client-libs-dev mailing list