RFR: 8345468: test/jdk/javax/swing/JScrollBar/4865918/bug4865918.java fails in ubuntu22.04
Abhishek Kumar
abhiscxk at openjdk.org
Wed Dec 4 13:26:43 UTC 2024
On Wed, 4 Dec 2024 09:18:51 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:
> Test is failing in OCI system citing
>
> java.lang.Error: The scrollbar block increment is incorect
> at bug4865918.main(bug4865918.java:68)
>
> seemingly because focus is not in scrollbar..Added stability delay to make test execution wait after frame visibility and made frame to center of screen.
> Test passed in several OCI systems with this modification...
test/jdk/javax/swing/JScrollBar/4865918/bug4865918.java line 1:
> 1: /*
L72 - L77 can be changed to use lambda expression..
`SwingUtilities.invokeAndWait(() -> result[0] = sbar.getValue());`
test/jdk/javax/swing/JScrollBar/4865918/bug4865918.java line 59:
> 57: robot.delay(200);
> 58:
> 59: int value = getValue();
`getValue()` can be evaluated in if condition directly, no need to have `value` variable.
typo in incorrect
throw new Error("The scrollbar block increment is `incorrect`");
may be changed to RTE instead of Error.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22540#discussion_r1869489694
PR Review Comment: https://git.openjdk.org/jdk/pull/22540#discussion_r1869477006
More information about the client-libs-dev
mailing list