JDK-6618531 : test java/awt/KeyboardFocusmanager/TypeAhead/TestDialogTypeAhead.html fails with latest JDK 7
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2007-10-18
  • Updated: 2011-01-25
  • Resolved: 2009-11-27
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 7
7Resolved
Related Reports
Duplicate :  
Description
The test java/awt/KeyboardFocusmanager/TypeAhead/TestDialogTypeAhead.html fails with the latest JDK 7 with the following output:

b is shown
b is focused
java.awt.event.KeyEvent[KEY_PRESSED,keyCode=32,keyText=Space,keyChar=' ',keyLocation=KEY_LOCATION_STANDARD] on button0
java.awt.event.KeyEvent[KEY_TYPED,keyCode=0,keyText=Unknown keyCode: 0x0,keyChar=' ',keyLocation=KEY_LOCATION_UNKNOWN] on button0
java.awt.event.KeyEvent[KEY_RELEASED,keyCode=32,keyText=Space,keyChar=' ',keyLocation=KEY_LOCATION_STANDARD] on button0
B pressed
java.lang.Error: Test error.
	at TestDialogTypeAhead$TestDialog$1.invoke(TestDialogTypeAhead.java:327)
	at $Proxy0.blockWindows(Unknown Source)
	at java.awt.Dialog.blockWindows(Dialog.java:1586)
	at java.awt.Dialog.modalShow(Dialog.java:1463)
	at java.awt.Dialog.conditionalShow(Dialog.java:929)
	at java.awt.Dialog.show(Dialog.java:1062)
	at java.awt.Component.show(Component.java:1456)
	at java.awt.Component.setVisible(Component.java:1408)
	at java.awt.Window.setVisible(Window.java:871)
	at java.awt.Dialog.setVisible(Dialog.java:1012)
	at TestDialogTypeAhead$4.actionPerformed(TestDialogTypeAhead.java:138)
	at java.awt.Button.processActionEvent(Button.java:410)
	at java.awt.Button.processEvent(Button.java:378)
	at java.awt.Component.dispatchEventImpl(Component.java:4461)
	at java.awt.Component.dispatchEvent(Component.java:4287)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:605)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:276)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:191)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:186)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:139)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:623)
	at TestDialogTypeAhead$TestDialog$1.invoke(TestDialogTypeAhead.java:323)
	... 21 more
Caused by: java.lang.ClassCastException: $Proxy0 cannot be cast to sun.awt.X11.XDialogPeer
	at sun.awt.X11.XWindowPeer.setModalBlocked(XWindowPeer.java:1379)
	at sun.awt.X11.XDialogPeer.blockWindows(XDialogPeer.java:129)
	... 26 more

Note that the test passes when run with JDK 6.

Comments
EVALUATION In the context of the CR 6616792 the following test will be fixed: test/closed/java/awt/Focus/TypeAhead/TestFocusFreeze.java The test being reported actually does the same checks. So, we're free to remove it.
07-11-2007

EVALUATION Failure is reported with XToolkit. Putback of 6446952 made DialogPeer be decorated with a proxy to intercept invocation of show (see TestDialogTypeAhead.TestDialog.replacePeer). But it causes ClassCastException in sun.awt.X11.XWindowPeer.setModalBlocked at XDialogPeer blockerPeer = (XDialogPeer) ComponentAccessor.getPeer(d);
18-10-2007