On Fri, 21 Apr 2023 21:15:49 GMT, Sergey Bylokhov <[email protected]> wrote:
>> This opensources few AWT Graphics & GridBagLayout tests
>
> test/jdk/java/awt/Graphics/GetGraphicsTest.java line 35:
>
>> 33: import java.awt.Graphics;
>> 34:
>> 35: public class GetGraphicsTest {
>
> What this test is expected to test? the getBackground/getForeground/getFont
> seems to be all unused.
As the test summary mentioned, it supposed to "Check getGraphics doesn't throw
NullPointerExcepton for invalid colors and font"...the closed test was also
like it...was applet based which is just converted to use
BufferedImage.getGraphics to be a headless test..
Seems [4746122](https://bugs.openjdk.org/browse/JDK-4746122):Failed to load
applet fix is about applet,
Once comment in the bug says
The problem is applet overrides Component.getBackground()/getForeground() to
return null. So SunGraphics2D is created with null params
so I guess this test is redundant now and we can remove..please suggest..
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13570#discussion_r1174740376