Skip to content

Commit df8ec09

Browse files
committedSep 20, 2022
8294046: Newly added test test/jdk/javax/swing/JTabbedPane/TestNPEStateChgListener.java fails in macos
Reviewed-by: azvegint, prr
1 parent 09af637 commit df8ec09

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed
 

‎src/java.desktop/macosx/classes/com/apple/laf/AquaTabbedPaneUI.java

+1
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,7 @@ public void propertyChange(final PropertyChangeEvent e) {
810810
protected ChangeListener createChangeListener() {
811811
return new ChangeListener() {
812812
public void stateChanged(final ChangeEvent e) {
813+
JTabbedPane tabPane = (JTabbedPane)e.getSource();
813814
if (!isTabVisible(tabPane.getSelectedIndex())) popupSelectionChanged = true;
814815
tabPane.revalidate();
815816
tabPane.repaint();

‎test/jdk/javax/swing/JTabbedPane/TestNPEStateChgListener.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
/*
2424
* @test
2525
* @key headful
26-
* @bug 6286501
26+
* @bug 6286501 8294046
2727
* @summary Verifies if NPE is thrown from stateChanged listener of JTabbedPane
2828
* @run main TestNPEStateChgListener
2929
*/

0 commit comments

Comments
 (0)
Please sign in to comment.