RFR: 8341982: Simplify JButton/bug4323121.java [v8]
Alexey Ivanov
aivanov at openjdk.org
Wed Nov 6 17:19:03 UTC 2024
> 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 with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 10 additional commits since the last revision:
- Merge master
- Update summary and error message
- Get rid of windowGainedFocus latch
- Use JButton directly instead of TestButton subclass
- Remove space before comma
Co-authored-by: Abhishek Kumar <abhishek.cx.kumar at oracle.com>
- Amend indentation in the finally block
- Inline mouseEntered listener for the button
- Clarify thread-safety of the modelArmed flag
- Remove MouseMotionListener; get rid of eventHandler variable
- 8341982: Simplify JButton/bug4323121.java
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/21475/files
- new: https://git.openjdk.org/jdk/pull/21475/files/d61e4331..3558f0c5
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=21475&range=07
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=21475&range=06-07
Stats: 246583 lines in 2680 files changed: 148578 ins; 72734 del; 25271 mod
Patch: https://git.openjdk.org/jdk/pull/21475.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/21475/head:pull/21475
PR: https://git.openjdk.org/jdk/pull/21475
More information about the client-libs-dev
mailing list