RFR: 8068293: [TEST_BUG] Test closed/com/sun/java/swing/plaf/motif/InternalFrame/4150591/bug4150591.java fails with GTKLookAndFeel

Sergey Bylokhov serb at openjdk.org
Thu Oct 23 01:09:13 UTC 2025


On Wed, 22 Oct 2025 05:44:27 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

> I believe there's always a chance of passing null value to this method from the app since it is public so even if we fix this particular issue somewhere else, there will always be a possibility of getting NPE when null value is passed as highlight and shadow, so this fix is fixing both the gtk issue and border NPE issue

Maybe, but the updated code would not follow the spec, which requires that the new border use the color parameters for rendering. Instead, it would use "brighter shades of the component's current background color for highlighting, and darker shades for shadows." Also, note that there are several other similar methods that gets the colors, do all of them throw a NPE on null?

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

PR Comment: https://git.openjdk.org/jdk/pull/27839#issuecomment-3434723363


More information about the client-libs-dev mailing list