-
Bug
-
Resolution: Fixed
-
P4
-
7u21, 8, 9
-
b127
-
windows_7
FULL PRODUCT VERSION :
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
ADDITIONAL OS VERSION INFORMATION :
Windows 6.1.7601
A DESCRIPTION OF THE PROBLEM :
If an uncaught exception is thrown inside an action listener for a JComboBox, that action listener will no longer receive action events. Note that if an uncaught exception is throws inside the action listener for a JButton for example, the listener will still receive subsequent action events.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JComboBox;
import javax.swing.JFrame;
public class Test {
public static void main(String[] args) {
JFrame frame = new JFrame();
final JComboBox cb = new JComboBox(new String[] { " a " , " b " , " c " , " d " , " e " });
// JButton cb = new JButton( " sdf " );
cb.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
System.out.println( " actionPerformed " );
throw new RuntimeException();
}
});
frame.getContentPane().add(cb);
frame.setSize(500, 500);
frame.setVisible(true);
}
}
---------- END SOURCE ----------
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
ADDITIONAL OS VERSION INFORMATION :
Windows 6.1.7601
A DESCRIPTION OF THE PROBLEM :
If an uncaught exception is thrown inside an action listener for a JComboBox, that action listener will no longer receive action events. Note that if an uncaught exception is throws inside the action listener for a JButton for example, the listener will still receive subsequent action events.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JComboBox;
import javax.swing.JFrame;
public class Test {
public static void main(String[] args) {
JFrame frame = new JFrame();
final JComboBox cb = new JComboBox(new String[] { " a " , " b " , " c " , " d " , " e " });
// JButton cb = new JButton( " sdf " );
cb.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
System.out.println( " actionPerformed " );
throw new RuntimeException();
}
});
frame.getContentPane().add(cb);
frame.setSize(500, 500);
frame.setVisible(true);
}
}
---------- END SOURCE ----------