RFR: 8294046: Newly added test test/jdk/javax/swing/JTabbedPane/TestNPEStateChgListener.java fails in macos

Phil Race prr at openjdk.org
Tue Sep 20 15:21:44 UTC 2022


On Tue, 20 Sep 2022 09:16:39 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

> Test added for fix [JDK-6286501](https://bugs.openjdk.org/browse/JDK-6286501)  fails in macos citing 
> 
> java.lang.NullPointerException: Cannot invoke "javax.swing.JTabbedPane.getSelectedIndex()" 
> because "this.this$0.tabPane" is null
> at java.desktop/com.apple.laf.AquaTabbedPaneUI$2.stateChanged(AquaTabbedPaneUI.java:813) 
> 
> 
> for Aqua L&F owing to same issue as described in https://github.com/openjdk/jdk/pull/10216#discussion_r971787291 wherein the old instance is uninstalled and tabPane is reset to null when updateUI() is called in stateChange Listener in testcase, so we need to use the tabPane instance passed in TabbedPane's stateChange listener as has been done for BasicTabbedPaneUI case.

Marked as reviewed by prr (Reviewer).

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

PR: https://git.openjdk.org/jdk/pull/10354



More information about the client-libs-dev mailing list