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

Abhishek Kumar abhiscxk at openjdk.org
Tue Feb 13 03:58:04 UTC 2024


On Mon, 12 Feb 2024 20:57:38 GMT, Alexander Zuev <kizune at openjdk.org> wrote:

>> Add null check for the Aqua LnF situation when tab is hidden die to the tabs overflow.
>
> Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Handling of InvalidComponentStateException added
>   
>   Added regression test

test/jdk/javax/swing/JTabbedPane/TabbedPaneNPECheck.java line 40:

> 38: import javax.swing.JTabbedPane;
> 39: import javax.swing.SwingUtilities;
> 40: import java.awt.BorderLayout;

suggestion: awt imports may be moved before swing and a11y imports.

test/jdk/javax/swing/JTabbedPane/TabbedPaneNPECheck.java line 56:

> 54:             SwingUtilities.invokeAndWait(me::test);
> 55:         } finally {
> 56:             if(mainFrame != null) {

Suggestion:

            if (mainFrame != null) {

test/jdk/javax/swing/JTabbedPane/TabbedPaneNPECheck.java line 91:

> 89:                     Point p = component.getLocationOnScreen();
> 90:                     Rectangle r = component.getBounds();
> 91:                 } catch(NullPointerException npe){

Suggestion:

                } catch (NullPointerException npe) {

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17736#discussion_r1487132284
PR Review Comment: https://git.openjdk.org/jdk/pull/17736#discussion_r1487132541
PR Review Comment: https://git.openjdk.org/jdk/pull/17736#discussion_r1487133620


More information about the client-libs-dev mailing list