diff -r 3cc0596f81a5 -r 9b9f901a909d jdk/src/share/classes/javax/swing/LookAndFeel.java --- a/jdk/src/share/classes/javax/swing/LookAndFeel.java Fri Feb 18 13:27:29 2011 +0300 +++ b/jdk/src/share/classes/javax/swing/LookAndFeel.java Fri Feb 18 19:21:57 2011 +0300 @@ -332,12 +332,13 @@ { JTextComponent.KeyBinding[] rv = new JTextComponent.KeyBinding[keyBindingList.length / 2]; - for(int i = 0; i < keyBindingList.length; i += 2) { - KeyStroke keystroke = (keyBindingList[i] instanceof KeyStroke) - ? (KeyStroke)keyBindingList[i] - : KeyStroke.getKeyStroke((String)keyBindingList[i]); - String action = (String)keyBindingList[i+1]; - rv[i / 2] = new JTextComponent.KeyBinding(keystroke, action); + for(int i = 0; i < rv.length; i ++) { + Object o = keyBindingList[2 * i]; + KeyStroke keystroke = (o instanceof KeyStroke) + ? (KeyStroke) o + : KeyStroke.getKeyStroke((String) o); + String action = (String) keyBindingList[2 * i + 1]; + rv[i] = new JTextComponent.KeyBinding(keystroke, action); } return rv;