RFR: 8322239: [macos] a11y : java.lang.NullPointerException is thrown when focus is moved on the JTabbedPane [v2]

Alexander Zuev kizune at openjdk.org
Mon Feb 12 20:57:38 UTC 2024


On Fri, 9 Feb 2024 04:26:48 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

>> Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Handling of InvalidComponentStateException added
>>   
>>   Added regression test
>
> src/java.desktop/share/classes/javax/swing/JTabbedPane.java line 2340:
> 
>> 2338: 
>> 2339:         public Point getLocationOnScreen() {
>> 2340:              Point parentLocation = parent.getLocationOnScreen();
> 
> possibly the "parent.getLocationOnScreen()" should be wrapped by the "try/catch IllegalComponentStateException"? If some parent is not visible then that exception will be thrown, but per the spec, the null should be returned.
> 
> I think this could be covered by the test since the change is in the public shared code.

Sure. I have added the handler ICSE and a regression test.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17736#discussion_r1486758634


More information about the client-libs-dev mailing list