On Thu, 5 Mar 2026 17:44:38 GMT, Alexey Ivanov <[email protected]> wrote:

>> Damon Nguyen has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Revert run change
>
> 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?

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

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

Reply via email to