Details
-
Type:
Bug
-
Status: Resolved
-
Priority:
P3
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 9
-
Component/s: client-libs
-
Subcomponent:
-
Introduced In Build:b45
-
Introduced In Version:
-
Resolved In Build:b76
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8136014 | emb-9 | Alexey Ivanov | P3 | Resolved | Fixed | team |
JDK-8257129 | openjdk8u282 | Alexey Ivanov | P3 | Resolved | Fixed | b04 |
Description
New implementation of test/swing/regtesthelpers/Util.getSystemMnemonicKeyCodes is not correct.
It combines key codes and key masks:
public static ArrayList<Integer> getSystemMnemonicKeyCodes() {
String osName = System.getProperty("os.name");
ArrayList<Integer> result = new ArrayList<>();
if (osName.contains("OS X")) {
result.add(KeyEvent.VK_CONTROL);
}
result.add(KeyEvent.ALT_MASK);
return result;
}
KeyEvent.VK_CONTROL and KeyEvent.ALT_MASK are combined, and then interpreted as key codes by hitMnemonics but KeyEvent.ALT_MASK is not a key code. Therefore tests which use Util.hitMnemonics fail now, for example test javax/swing/JFileChooser/8002077/bug8002077.java.
It combines key codes and key masks:
public static ArrayList<Integer> getSystemMnemonicKeyCodes() {
String osName = System.getProperty("os.name");
ArrayList<Integer> result = new ArrayList<>();
if (osName.contains("OS X")) {
result.add(KeyEvent.VK_CONTROL);
}
result.add(KeyEvent.ALT_MASK);
return result;
}
KeyEvent.VK_CONTROL and KeyEvent.ALT_MASK are combined, and then interpreted as key codes by hitMnemonics but KeyEvent.ALT_MASK is not a key code. Therefore tests which use Util.hitMnemonics fail now, for example test javax/swing/JFileChooser/8002077/bug8002077.java.
Attachments
Issue Links
- backported by
-
JDK-8136014 Util.hitMnemonics does not work: getSystemMnemonicKeyCodes() returns ALT_MASK rather than VK_ALT
-
- Resolved
-
-
JDK-8257129 Util.hitMnemonics does not work: getSystemMnemonicKeyCodes() returns ALT_MASK rather than VK_ALT
-
- Resolved
-
- blocks
-
JDK-8087110 [TESTBUG] Test javax/swing/JFileChooser/8002077/bug8002077.java fails
-
- Resolved
-
- relates to
-
JDK-8063104 Change open awt regression tests to avoid sun.awt.SunToolkit.realSync, part 2
-
- Resolved
-
-
JDK-8067441 Some tests fails with error: cannot find symbol getSystemMnemonicKeyCodes()
-
- Resolved
-