On Thu, 4 Mar 2021 17:21:43 GMT, Alexander Zuev <kiz...@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

Reply via email to