-
Bug
-
Resolution: Fixed
-
P3
-
1.4.2
-
rc
-
x86, sparc
-
solaris_8, solaris_9, windows_98
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2064936 | 5.0 | Abhijit Saha | P3 | Closed | Fixed | tiger |
Name: aaR10208 Date: 02/12/2003
Filed By : J2SE-SQA [###@###.###
JDK : JDK1.4.2-b16 (passed on b14)
Testbase : Regression-cte
Platform[s] : Windows 98
switch/Mode : -client
Falling test[s]: CTE_REGTEST/Generic/4107667/Test4107667.java
Regression test CTE_REGTEST/Generic/4107667/Test4107667.java test fails on JDK1.4.2-b16.
The test creates JFrame with a JTextFiled within and with a JPopupMenu assoticated with
a right-click on the JTextField.
The problem is that this JPopupMenu does not respond to Enter key (arrow keys are ok), so the test
fails.
It seems that the problem is introduced by the following code:
file: javax/swing/plaf/basic/BasicPopupMenuUI.java
=====
555 private static class ReturnAction extends AbstractAction {
556 public void actionPerformed(ActionEvent e) {
557 KeyboardFocusManager fmgr =
558 KeyboardFocusManager.getCurrentKeyboardFocusManager();
559 Component focusOwner = fmgr.getFocusOwner();
!> 560 if(focusOwner != null && !(focusOwner instanceof JRootPane)) {
!> 561 return;
562 }
=====
As result of the marked lines, when JPopupMenu is opened and is focused,
the ReturnAction.actionPerformed() does nothing.
Test source location:
=====================
/net/jdk/export/jpse04/Regression/1.4.2/test/CTE_REGTEST/Generic/4107667/Test4107667.java
/net/jdk/export/jpse04/Regression/1.4.2/test/CTE_REGTEST/Generic/4107667/Bug4107667.java
jtr file location:
==================
/net/jtgb4u4c.sfbay/export/sail15/results/mantis/b16/regtest/win32/win98_-client_linux-17/workDir/cte/CTE_REGTEST/Generic/4107667/Test4107667.jtr
How to reproduce:
=================
Run the following script (you may need to change its variables)
--- script start ---
#!/bin/sh
JDK=c:/j2sdk1.4.2
TEST_BASE_PATH=h:/java/regtest/cte/
JEMMY_PATH=h:/java/jemmy
PSEP=";"
#JDK=
#TEST_BASE_PATH=/net/jdk/export/jpse04/Regression/1.4.2/test
#JEMMY_PATH=/net/jdk/export/jpse04/Jemmy
#PSEP=":"
cp ${TEST_BASE_PATH}/CTE_REGTEST/Generic/4107667/Test4107667.java .
cp ${TEST_BASE_PATH}/CTE_REGTEST/Generic/4107667/Bug4107667.java .
${JDK}/bin/javac -classpath ${JEMMY_PATH}/jemmy.jar *.java
${JDK}/bin/java -showversion -cp ${JEMMY_PATH}/jemmy.jar${PSEP}. Test4107667
--- script end ---
Test output:
============
java version "1.4.2-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-beta-b16)
Java HotSpot(TM) Client VM (build 1.4.2-beta-b16, mixed mode)
[...]
Navigation by accelerator key 'b' works
Clearing text in text component
[...]
Navigation by arrow key doesn't work
Test Failed
Exception in thread "main" java.lang.RuntimeException: Test Failed
at Test4107667.main(Test4107667.java:109)
Specific machine info:
======================
Hostname: linux-17
OS: Windows 98
======================================================================
Same failure still seen on 1.4.2_02. Sparc 2.9
It's a regression from 1.4.1_x
###@###.### 2003-08-22
======================================================================
Same failure still seen on 1.4.2_02. Windows 2003 SE
It's a regression from 1.4.1_x
###@###.### 2003-08-28
======================================================================
Same failure still seen on 1.4.2_02. SuSE 8.2
It's a regression from 1.4.1_x
###@###.### 2003-08-28
======================================================================
- backported by
-
JDK-2064936 Regression: CTE_REGTEST/Generic/4107667/Test4107667.java failed
- Closed
- relates to
-
JDK-4930044 REGRESSION: Regression-cte 4107667/Test4107667.java fails on Win98,Suse8.2
- Resolved
-
JDK-4107667 Accelerators don't work on popup menus
- Closed