On Mon, 9 Mar 2026 19:36:27 GMT, Alexey Ivanov <[email protected]> wrote:

>> test/jdk/java/awt/TextComponent/CorrectTextComponentSelectionTest.java line 
>> 125:
>> 
>>> 123:         EventQueue.invokeAndWait(() -> color_center =
>>> 124:                 r.getPixelColor(loc.x + tc.getWidth() / 2,
>>> 125:                         loc.y + tc.getHeight() / 2));
>> 
>> I suggest modifying the code so that it stores the center point into `loc` 
>> in one go, instead of wrapping `r.getPixelColor` into another 
>> `invokeAndWait`.
>> 
>> 
>> Point p = tc.getLocationOnScreen();
>> p.translate(tc.getWidth() / 2, tc.getHeight() / 2);
>> loc = p;
>
> What about this comment?

Updated.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/30058#discussion_r2907762810

Reply via email to