JDK-7146237 : closed/java/awt/Focus/SetFocusTraversalKeysTest/SetFocusTraversalTest.html failed since 1.8.0b19
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 8
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic,windows
  • CPU: generic
  • Submitted: 2012-02-16
  • Updated: 2017-05-17
  • Resolved: 2012-05-22
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
8 b40Fixed
Related Reports
Duplicate :  
Description
closed/java/awt/Focus/SetFocusTraversalKeysTest/SetFocusTraversalTest.html failed since 1.8.0b19 on all platforms

see comments for more details
caused by fix of CR 7117334
http://hg.openjdk.java.net/jdk8/awt/jdk/diff/75bd7295c706/src/share/classes/java/awt/Component.java :
- for (Iterator iter = keystrokes.iterator(); iter.hasNext(); ) {
- Object obj = iter.next();
-
- if (obj == null) {
+ for (AWTKeyStroke keystroke : keystrokes ) {
+
+ if (keystroke == null) {
throw new IllegalArgumentException("cannot set null focus traversal key");
}
-
- // Fix for 6195828:
- //According to javadoc this method should throw IAE instead of ClassCastException
- if (!(obj instanceof AWTKeyStroke)) {
- throw new IllegalArgumentException("object is expected to be AWTKeyStroke");
- }
- AWTKeyStroke keystroke = (AWTKeyStroke)obj;

Comments
EVALUATION 1. Javadoc for java.awt.Component.setFocusTraversalKeys() should be updated, excluding wrong type of keystrokes as a case for throwing IllegalArgumentException: "or if any Object in keystrokes is not an AWTKeyStroke". 2. Regression and other tests should be changed accordingly (for example closed/java/awt/Focus/SetFocusTraversalKeysTest).
20-02-2012