RFR: 8339561: The test/jdk/java/awt/Paint/ListRepaint.java may fail after JDK-8327401 [v5]
    Alexey Ivanov 
    aivanov at openjdk.org
       
    Tue Mar  4 21:26:05 UTC 2025
    
    
  
On Tue, 4 Mar 2025 16:56:21 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
>> Several tests modified by https://github.com/openjdk/jdk/pull/19339 have been tweaked, see inline comments.
>> 
>> Notes:
>>  * We have a few XXXRepaint.java tests and in this patch, I updated all of them to follow the change added to the ListRepaint.java
>> 
>> @azvegint @aivanov-jdk please take a look.
>
> Sergey Bylokhov has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 13 commits:
> 
>  - copyright
>  - Merge branch 'openjdk:master' into JDK-8339561
>  - more volatiles
>  - revert change reported in JDK-8339791
>  - trigger github for new content
>  - trigger github for new content
>  - Merge branch 'master' into JDK-8339561
>  - Merge branch 'openjdk:master' into JDK-8339561
>  - Update bug4490179.java
>  - PR review part 1
>  - ... and 3 more: https://git.openjdk.org/jdk/compare/216f113f...c37b252a
test/jdk/java/awt/Paint/ButtonRepaint.java line 51:
> 49:                     frame.dispose();
> 50:                 }
> 51:             }
Would it be cleaner this way?
Suggestion:
            Frame frame = new Frame();
            try {
                frame.setSize(300, 300);
                frame.setLocationRelativeTo(null);
                ButtonRepaint button = new ButtonRepaint();
                frame.add(button);
                frame.setVisible(true);
                sleep();
                button.test();
            } finally {
                frame.dispose();
            }
This avoids the `null`-check in the `finally` block.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20861#discussion_r1980253274
    
    
More information about the client-libs-dev
mailing list