Just two small comments:
- JComboBox line 1256 and 1257: the 'finally' keyword should be on the same line as open bracket - ActionListenerExceptionTest.test() method: all calls to Swing objects should be done on EDT

Thanks,
Alexandr.

On 6/15/2016 10:05 AM, Ajit Ghaisas wrote:
Hi,

Bug :
     https://bugs.openjdk.java.net/browse/JDK-8041909

Issue :
     Uncaught exceptions in JComboBox listeners cause listener not to receive 
events.
     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 thrown inside the action listener 
for a JButton for example, the listener will still receive subsequent action 
events.

Root Cause :
     fireActionEvent() method in JComboBox class has a boolean guard (namely 
firingActionEvent) to ensure that an infinite loop is not created.
     This guard is not reset if any exception occurs in actionPerformed() 
method.
     This results in permanent breaking of subsequent action listener 
invocations of JComboBox.

Fix :
     The boolean guard (namely firingActionEvent) is reset in finally block.
     This results in firingActionEvent being set to false at the end of 
fireActionEvent() method even in case of exception in actionPerformed() method.

Webrev :
     http://cr.openjdk.java.net/~aghaisas/8041909/webrev.00/

Request you to review.

Regards,
Ajit

Reply via email to