RFR: 8365379: SU3.applyInsets may produce wrong results [v11]

Alexey Ivanov aivanov at openjdk.org
Tue Sep 16 10:22:47 UTC 2025


On Tue, 16 Sep 2025 06:51:14 GMT, Renjith Kannath Pariyangad <rkannathpari at openjdk.org> wrote:

>> Hi Reviewers,
>> 
>> I have updated the insets calculation, similar calculation observed in **SynthGraphicsUtils.java**. Reused the **SwingUtilities3.java** modified code
>> 
>> Please review and let me know your suggestions if any.
>
> Renjith Kannath Pariyangad has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Removed null check and fixed alignment

Changes requested by aivanov (Reviewer).

test/jdk/com/sun/java/swing/SwingUtilities3/ApplyInsetsTest.java line 46:

> 44:                                            rect.height - (insets.top + insets.bottom));
> 45: 
> 46:         SwingUtilities3.applyInsets(rect, insets);

I suggest adding a test for `leftToRight = false` too.

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

PR Review: https://git.openjdk.org/jdk/pull/27157#pullrequestreview-3228996517
PR Review Comment: https://git.openjdk.org/jdk/pull/27157#discussion_r2351849263


More information about the client-libs-dev mailing list