RFR: 8341982: Simplify JButton/bug4323121.java [v4]

Harshitha Onkar honkar at openjdk.org
Fri Oct 18 19:21:04 UTC 2024


On Fri, 18 Oct 2024 12:19:24 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> The test `javax/swing/JButton/bug4323121.java` contains lots of unused methods.
>> 
>> I removed all the unused methods by extending `MouseAdapter`.
>> 
>> I use `CountDownLatch` to synchronise actions in the test.
>> 
>> The test still verifies `button.getModel().isArmed()` doesn't always return `true` for classes which extend `JButton`. I verified the updated test fails in 1.3.0 and passes in 1.4.0, so the test still reproduces the original problem.
>
> Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Remove space before comma
>   
>   Co-authored-by: Abhishek Kumar <abhishek.cx.kumar at oracle.com>

LGTM

test/jdk/javax/swing/JButton/bug4323121.java line 123:

> 121:     }
> 122: 
> 123:     private static final class TestButton extends JButton {

There isn't much custom code within TestButton but it is retained as subclass of JButton because of test requirement?

test/jdk/javax/swing/JButton/bug4323121.java line 128:

> 126:         }
> 127:     }
> 128: 

Extra newline

-------------

Marked as reviewed by honkar (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/21475#pullrequestreview-2378819677
PR Review Comment: https://git.openjdk.org/jdk/pull/21475#discussion_r1806927455
PR Review Comment: https://git.openjdk.org/jdk/pull/21475#discussion_r1806927999


More information about the client-libs-dev mailing list