RFR: 8322239: [macos] a11y : java.lang.NullPointerException is thrown when focus is moved on the JTabbedPane
Sergey Bylokhov
serb at openjdk.org
Fri Feb 9 04:30:02 UTC 2024
On Tue, 6 Feb 2024 20:13:01 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.
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.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17736#discussion_r1483846936
More information about the client-libs-dev
mailing list