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.

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

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

Changes: https://git.openjdk.org/jdk/pull/10354/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10354&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8294046
  Stats: 2 lines in 2 files changed: 1 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/10354.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/10354/head:pull/10354

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

Reply via email to