Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
prsadhuk committed Dec 4, 2024
1 parent 9455cfb commit 1423bb7
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions test/jdk/javax/swing/JScrollBar/4865918/bug4865918.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,8 @@ public static void main(String[] argv) throws Exception {
robot.waitForIdle();
robot.delay(200);

int value = getValue();

if (value != 9) {
throw new Error("The scrollbar block increment is incorect");
if (getValue() != 9) {
throw new RuntimeException("The scrollbar block increment is incorrect");
}
} finally {
if (frame != null) SwingUtilities.invokeAndWait(() -> frame.dispose());
Expand All @@ -69,11 +67,8 @@ public static void main(String[] argv) throws Exception {
private static int getValue() throws Exception {
final int[] result = new int[1];

SwingUtilities.invokeAndWait(new Runnable() {
@Override
public void run() {
result[0] = sbar.getValue();
}
SwingUtilities.invokeAndWait(() -> {
result[0] = sbar.getValue();
});

return result[0];
Expand Down

0 comments on commit 1423bb7

Please sign in to comment.