<Swing Dev> [14] RFR JDK-8234149:Several regression tests do not dispose Frame at end

Prasanta Sadhukhan prasanta.sadhukhan at oracle.com
Fri Nov 15 07:02:32 UTC 2019


Hi Sergey,

I can remove the dispose from manual tests, but are you questioning the 
basic need of these dispose in "all" tests?

On 15-Nov-19 12:17 PM, Sergey Bylokhov wrote:
> Hi, Prasanta.
>
> In a few files you have updated the manual tests which I think changed 
> the behavior of the tests, for example:
> test/jdk/javax/swing/JSlider/6524424/bug6524424.java
>
> Not sure that such code is useful:
>   59         frame.setVisible(true);
>   60         } finally {
>   61             if (frame != null) SwingUtilities.invokeAndWait(() -> 
> frame.dispose());
>   62         }
>
> On 11/14/19 12:56 am, Prasanta Sadhukhan wrote:
>> Hi All,
>>
>> Please review a fix for an issue seen in several tests where the 
>> JFrame created is not disposed of at all code paths.
>>
>> This sometimes leaves some artifacts thereby affecting execution of 
>> subsequent tests, causing those to fail.
>>
>> Proposed fix is to make sure the JFrame is disposed in try-finally 
>> block to ensure frame is disposed irrespective of execution outcome 
>> of the test.
>>
>> This list is not exhaustive as there are still some tests it is not 
>> covered here and
>>
>> I have not taken care of indentation to ensure only the 
>> change/modification is highlighted and not all indented lines.
>>
>> Mach5 status link is there in JBS.
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8234149
>>
>> webrev: http://cr.openjdk.java.net/~psadhukhan/8234149/webrev.0/
>>
>> Regards
>>
>> Prasanta
>>
>
>


More information about the swing-dev mailing list