RFR: 8352682: Opensource JComponent tests [v2]
Mikhail Yankelevich
myankelevich at openjdk.org
Fri Apr 11 14:03:33 UTC 2025
On Thu, 10 Apr 2025 12:32:02 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:
>> Few JComponent tests are opensourced
>
> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>
> Use lambda
test/jdk/javax/swing/JComponent/bug4247610.java line 29:
> 27: * @summary Tests an unnecessary repaint issue
> 28: * @key headful
> 29: * @run main bug4247610
Nitpick: is this needed?
test/jdk/javax/swing/JComponent/bug4247610.java line 59:
> 57: Robot robot = new Robot();
> 58: SwingUtilities.invokeAndWait(() -> {
> 59: frame = new JFrame("bug4247610");
Do you think this might cleaner if it was initialised at line 51? Also would allow to make it final
test/jdk/javax/swing/JComponent/bug4247610.java line 122:
> 120: return !passFlag;
> 121: }
> 122: private static synchronized void fail() {
I think these methods are a bit redundant, just add more code to read and understand. What about removing them and just renaming the flags `failed` and `traced`?
What do you think?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24562#discussion_r2039549645
PR Review Comment: https://git.openjdk.org/jdk/pull/24562#discussion_r2039572120
PR Review Comment: https://git.openjdk.org/jdk/pull/24562#discussion_r2039548680
More information about the client-libs-dev
mailing list