JDK-8009883 : REGRESSION: test/closed/javax/swing/AbstractButton/4246045/bug4246045.java fails
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.accessibility
  • Affected Version: 8
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2013-03-12
  • Updated: 2014-07-29
  • Resolved: 2014-05-26
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u20Fixed 9 b22Fixed
Related Reports
Relates :  
Description
Testsuite name: regression 
Test name: closed/javax/swing/AbstractButton/4246045/bug4246045.java
JDK tested: JDK 8 b80
OS tested: Linux Ubuntu 12.04 x64
Is it a regression: YES 
Regression introduced in build: JDK 8 b77 
Test passes against JDK 8 b76

LOG: 

#section:applet
----------messages:(3/121)----------
command: applet bug4246045.html
reason: User specified action: run applet bug4246045.html 
elapsed time (seconds): 0.857
----------System.out:(0/0)----------
----------System.err:(39/2787)----------
java.lang.Error: Bad value of ACCESSIBLE_STATE_PROPERTY
	at bug4246045$Listener.propertyChange(bug4246045.java:34)
	at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:327)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:263)
	at javax.accessibility.AccessibleContext.firePropertyChange(AccessibleContext.java:745)
	at java.awt.Component$AccessibleAWTComponent$AccessibleAWTFocusHandler.focusGained(Component.java:9088)
	at java.awt.AWTEventMulticaster.focusGained(AWTEventMulticaster.java:220)
	at java.awt.Component.processFocusEvent(Component.java:6402)
	at java.awt.Component.processEvent(Component.java:6269)
	at java.awt.Container.processEvent(Container.java:2229)
	at java.awt.Component.dispatchEventImpl(Component.java:4869)
	at java.awt.Container.dispatchEventImpl(Container.java:2287)
	at java.awt.Component.dispatchEvent(Component.java:4691)
	at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1953)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:968)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:600)
	at java.awt.Component.dispatchEventImpl(Component.java:4740)
	at java.awt.Container.dispatchEventImpl(Container.java:2287)
	at java.awt.Component.dispatchEvent(Component.java:4691)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:722)
	at java.awt.EventQueue.access$200(EventQueue.java:103)
	at java.awt.EventQueue$3.run(EventQueue.java:681)
	at java.awt.EventQueue$3.run(EventQueue.java:679)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.awt.EventQueue$4.run(EventQueue.java:695)
	at java.awt.EventQueue$4.run(EventQueue.java:693)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:692)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:216)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:135)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:123)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:119)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:111)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)
STATUS:Failed.Applet thread threw exception: java.lang.Error: Bad value of ACCESSIBLE_STATE_PROPERTY
result: Failed. Execution failed: Applet thread threw exception: java.lang.Error: Bad value of ACCESSIBLE_STATE_PROPERTY


test result: Failed. Execution failed: Applet thread threw exception: java.lang.Error: Bad value of ACCESSIBLE_STATE_PROPERTY
Comments
Reviews: http://mail.openjdk.java.net/pipermail/swing-dev/2014-May/003452.html Patch: http://cr.openjdk.java.net/~ptbrunet/JDK-8009883/webrev.05/
23-05-2014

This fix will resolve the regression caused by JDK-7179482.
09-05-2014

See http://cr.openjdk.java.net/~ptbrunet/JDK-8009883/webrev.00/ The problem is due to the use of the deprecated field JComponent.AccessibleJComponent.accessibleFocusHandler. Instead of using that the code needs to use the equivalent field accessibleAWTFocusHandler in the Component.AccessibleAWTComponent superclass. A side effect of the fix is that logic needs to be added in Component.AccessibleAWTComponent.addPropertyChangeListener to deal with the fact that the Component.AccessibleAWTComponent.accessibleAWTFocusHandler field can be set either from within the subclass method JComponent.AccessibleJComponent.addPropertyChangeListener or via an external call to Component.AccessAWTComponent.addPropertyChangeListener.
07-05-2014

There is a possibility that: 1) This is not just an issue with focus events 2) This may cause a performance problem in those cases where lots of events are being fired.
09-10-2013

I ran the test case standalone, commented out the part in the listener that does the testing and throwing of the exception and adding printlns to display the event source and newValue and see double events happening: 2 focus gained on the button 2 focus lost on the button 2 focus gained on the toggle button 2 focus lost on the toggle button I can see how that will cause a problem for the test case. I real life it doesn't cause a problem for the screen reader because they ignore focus events for something that already has focus. I need to look into it. Since it won't cause a problem for an end user I am thinking it should be a P4 instead of a P2. Also note that Leonid proved this was a regression by comparing 8 EA b76 and b77.
08-10-2013

This is a regression from JDK-7179482
02-10-2013