RFR: 8235404: [macos] JOptionPane blocks drawing string on another component [v2]
Alisen Chung
achung at openjdk.org
Mon Aug 5 17:32:35 UTC 2024
On Fri, 2 Aug 2024 00:22:00 GMT, Harshitha Onkar <honkar at openjdk.org> wrote:
>> test/jdk/javax/swing/JOptionPane/OptionPaneInput.java line 89:
>>
>>> 87: f.setVisible(true);
>>> 88:
>>> 89: JOptionPane.showMessageDialog(null, t);
>>
>> Since parentComponent of JOptionPane is null running into NPE.
>>
>>
>> parentComponent.revalidate();
>> parentComponent.repaint();
>
> The fix should handle both cases - when parentComponent is null and not null. With current fix, if there is a case when parentComponent is null, we will run into NPE.
added null check
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20359#discussion_r1704431617
More information about the client-libs-dev
mailing list