<Swing Dev> RFR: 8261689: javax/swing/JComponent/7154030/bug7154030.java still fails with "Exception: Failed to hide opaque button" [v3]
Sergey Bylokhov
serb at openjdk.java.net
Thu Mar 4 22:45:41 UTC 2021
On Thu, 4 Mar 2021 17:21:43 GMT, Alexander Zuev <kizune at openjdk.org> wrote:
>> test/jdk/javax/swing/JComponent/7154030/bug7154030.java line 115:
>>
>>> 113: Graphics g = fullScreen.getGraphics();
>>> 114: g.setColor(Color.RED);
>>> 115: g.drawRect(locx - 1, locy - 1, frw + 1, frh + 1);
>>
>> I believe we need to call g.dispose to dispose this object which we normallydo after getGraphics() call.
>
> It is not necessary in such a short test, JVM will exit after test ends which will clear all the resources captured by this Graphics instance.
BTW it will be closed/released only if the tests are run in the othervm mode, but jtreg tests might share the single VM for a group of tests.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2790
More information about the swing-dev
mailing list