On Thu, 2 Jun 2022 22:29:50 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:

> I see that the bug description has a test case which produce this exception. 
> There are these lines on the stack:
> 
> ```
>       at 
> sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:116)
>       at java.awt.Container.paint(Container.java:1978)
>       at java.awt.Window.paint(Window.java:3906)
> ```
> 
> So your automatic test may override the paint method and catch an exception 
> there. The main method will check some flags at the end. You can also repaint 
> the window a few times to make sure it is painted. Can we iterate all 
> installed L&F? It seems the test does not have any windows specific code.
> 
> I think that the rendering to the BufferedImage as suggested by @aivanov-jdk 
> should work as well.

Yeah sure @mrserb , will test it on other L&F. I think rendering to the 
BufferedImage might not invoke NPE, so just wanted to retain the same flow as 
the bug was raised. Anyhow will try to play around and see if it works.

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

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

Reply via email to