On Wed, 5 Jun 2024 22:27:43 GMT, Alisen Chung <[email protected]> wrote:
>> Abhishek Kumar has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> copyright year update
>
> src/java.desktop/share/classes/javax/swing/table/JTableHeader.java line 1368:
>
>> 1366: try {
>> 1367: parentLocation = parent.getLocationOnScreen();
>> 1368: } catch (IllegalComponentStateException icse) {
>
> should we be preventing the exception by checking if the JTableHeader is
> visible or not instead?
As per the spec, getLocationOnScreen() API can throw ICSE and it should be
right to catch this exception rather than preventing it upfront by checking
JTableHeader's visibility. Moreover, I tried checking with the visibility,
still got the ICSE while performing the testing. So, I think this should be an
ideal way to handle.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19391#discussion_r1628783298