JDK-6356720 : REGRESSION: CTE_REGTEST/Generic/4449624 is failing on windows
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.3.1_17,1.3.1_19,1.4.2_29,5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Won't Fix
  • OS: windows,windows_2000,windows_2008
  • CPU: generic,x86
  • Submitted: 2005-11-29
  • Updated: 2013-01-15
  • Resolved: 2009-02-25
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
Testcase CTE_REGTEST/Generic/4449624 from regression testsuite is failing with 1.3.1_14 onwards.

Steps to follow :
Compile and run the attached testcase.

Click the button to open a window. It will have a red box in it.
Iconify it and restore. 

The window should still have the focus (which is red). 

Without the fix, the restored window is blue (lost focus). 
With the fix, it is red.

Test shows window with blue box, means failed.
During investigation I observerd the test may pass if the operator inadvertently clicks in the de-iconized window before the test checks it. The period available for this is small, roughly one second or less.

Otherwise a consistent failure is observed.

Comments
EVALUATION Until some customer noticed this, will not fix in 1.3.1_xx.
25-02-2009

WORK AROUND if the user/customer clicks on the component, it would provide the expected behavior.
13-12-2005

SUGGESTED FIX For some reason the java.awt.Window started overriding dispatchEventImpl(AWTEvent e) in 1.41 (on 11/18/1996) for FocusEvent.FOCUS_GAINED. These many days I tried to find out why it is there but could not. May be along with the fix for CR 4380809, this code should have been removed. But caused two regressions. So, the new fix is available at: http://tempest.india/bugs/6356720/trial2/131/webrev/
13-12-2005

EVALUATION Post the fix for CR 4380809, the java.awt.Window.dispatchEventImpl(AWTEvent) does not require to handle the FocusEvent.FOCUS_GAINED to set the focus owner. This can be left over to the Component's implementation. Removing this code should resolve this issue.
09-12-2005