-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P2
-
Affects Version/s: 6, 7
-
Component/s: client-libs
-
b132
-
generic
-
generic
-
Verified
The spec for the method LookAndFeel.makeKeyBindings(Object[] keyBindingList) says:
"If keyBindingList's length is odd, the last element is ignored."
In fact JDK 6.0 b98 throws ArrayIndexOutOfBoundsException while passing array with odd length to the method:
final Object[] keyActionArray = {
"UP", DefaultEditorKit.upAction,
KeyStroke.getKeyStroke("DOWN"), DefaultEditorKit.downAction,
"PAGE_UP"
};
JTextComponent.KeyBinding[] keyBindingsArray =
LookAndFeel.makeKeyBindings(keyActionArray);
"If keyBindingList's length is odd, the last element is ignored."
In fact JDK 6.0 b98 throws ArrayIndexOutOfBoundsException while passing array with odd length to the method:
final Object[] keyActionArray = {
"UP", DefaultEditorKit.upAction,
KeyStroke.getKeyStroke("DOWN"), DefaultEditorKit.downAction,
"PAGE_UP"
};
JTextComponent.KeyBinding[] keyBindingsArray =
LookAndFeel.makeKeyBindings(keyActionArray);