Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6474153

LookAndFeel.makeKeyBindings(...) doesn't ignore last element in keyBindingList with odd size

    Details

    • Subcomponent:
    • Resolved In Build:
      b132
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Description

      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);

        Attachments

          Activity

            People

            • Assignee:
              alexp Alexander Potochkin (Inactive)
              Reporter:
              dmiltsov Dmitry Miltsov (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: