RFR: 8352149: Test java/awt/Frame/MultiScreenTest.java generates too many frames on Linux [v6]
    Abhishek Kumar 
    abhiscxk at openjdk.org
       
    Fri May 30 18:49:55 UTC 2025
    
    
  
On Fri, 9 May 2025 13:05:40 GMT, Khalid Boulanouare <duke at openjdk.org> wrote:
>> Fixes issue in which the test fails when run on multi-screen machine.
>> 
>> Tested on Ubuntu 24.04, MacOS 15 and Windows 11
>> 
>> JTREG
>> 
>> runner starting test: java/awt/Frame/MultiScreenTest.java
>> runner finished test: java/awt/Frame/MultiScreenTest.java
>> Passed. Execution successful
>
> Khalid Boulanouare has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Adds Override for overriden methods
You may remove setting the `title for instruction` and `row count` for PassFailJFrame.
test/jdk/java/awt/Frame/MultiScreenTest.java line 103:
> 101:             if (gc.length > 0) {
> 102:                 for (int i = 0; i < gc.length && i < 10; i++) {
> 103:                     JFrame f = new JFrame(gc[i]); //test JFrame( gc )
Suggestion:
                    JFrame f = new JFrame(gc[i]); // test JFrame( gc )
test/jdk/java/awt/Frame/MultiScreenTest.java line 104:
> 102:                 for (int i = 0; i < gc.length && i < 10; i++) {
> 103:                     JFrame f = new JFrame(gc[i]); //test JFrame( gc )
> 104:                     GCCanvas c = new GCCanvas(gc[i]);// test canvas( gc )
For consistency
Suggestion:
                    GCCanvas c = new GCCanvas(gc[i]); // test canvas( gc )
test/jdk/java/awt/Frame/MultiScreenTest.java line 112:
> 110:                     f.setTitle("Screen# " + Integer.toString(j) + ", GC#" + Integer.toString(i));
> 111:                     f.setSize(300, 200);
> 112:                     f.setLocation(400 + xoffs, (i * 150) + yoffs);// test
Suggestion:
                    f.setLocation(400 + xoffs, (i * 150) + yoffs); // test
test/jdk/java/awt/Frame/MultiScreenTest.java line 178:
> 176:         g.fillArc(150, 30, 30, 30, 0, 200);
> 177:     }
> 178: @Override
You may add a blank line before `@Override` line to maintain consistency. Also add 4 spaces to move `@Override` similar to other methods
Suggestion:
    @Override
-------------
PR Review: https://git.openjdk.org/jdk/pull/24752#pullrequestreview-2882210805
PR Review Comment: https://git.openjdk.org/jdk/pull/24752#discussion_r2116449111
PR Review Comment: https://git.openjdk.org/jdk/pull/24752#discussion_r2116448694
PR Review Comment: https://git.openjdk.org/jdk/pull/24752#discussion_r2116449951
PR Review Comment: https://git.openjdk.org/jdk/pull/24752#discussion_r2116450051
    
    
More information about the client-libs-dev
mailing list