RFR: 8339902: Open source couple TextField related tests
Harshitha Onkar
honkar at openjdk.org
Mon Sep 16 23:28:05 UTC 2024
On Mon, 16 Sep 2024 23:02:58 GMT, Alexander Zuev <kizune at openjdk.org> wrote:
> Clean up and open source five TextField related tests:
> java/awt/TextField/CaretPositionTest;
> java/awt/TextField/SetBoundsTest;
> java/awt/TextField/SetEchoCharTest4;
> java/awt/TextField/SetPasswordTest;
> java/awt/TextField/ZeroEchoCharTest
Changes requested by honkar (Reviewer).
test/jdk/java/awt/TextField/CaretPositionTest/CaretPositionTest.java line 51:
> 49: private Dimension size;
> 50: String text = "12 45 789";
> 51: private static int position = -1;
Since position var is accessed in 2 different threads, should it be changed to volatile?
test/jdk/java/awt/TextField/CaretPositionTest/CaretPositionTest.java line 60:
> 58: test.test();
> 59: if (position != 9) {
> 60: System.err.println("Caret position should be at the end of the string");
Should be throw new RuntimeException("Caret position should be at the end of the string") ??
-------------
PR Review: https://git.openjdk.org/jdk/pull/21026#pullrequestreview-2307988198
PR Review Comment: https://git.openjdk.org/jdk/pull/21026#discussion_r1762076251
PR Review Comment: https://git.openjdk.org/jdk/pull/21026#discussion_r1762076497
More information about the client-libs-dev
mailing list