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

java.awt.event.KeyEvent.isActionKey() spec is incorrect

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.2.0
    • docs
    • beta2
    • sparc
    • solaris_2.5



      Name: mgC56079 Date: 05/18/98



      Here is the source:
          /** Returns whether or not the key in this event is an "action" key,
           * as defined in Event.java.
           *
           * @return boolean value, true if the key is an "action" key
           *
           * @see Event
           */
          public boolean isActionKey() {
              switch (keyCode) {
                case VK_HOME:
                // skipped ...
                case VK_NONCONVERT:
                // skipped ...
                case VK_STOP:
                    return true;
              }
              return false;
          }

      The spec says that key is an action key if it is defined to be action key in java.awt.Event spec.
      However, several keys (e.g. VK_NONCONVERT) for which isActionKey() of 1.2beta4 returns true
      are not described in java.awt.Event spec.

      java.awt.event.KeyEvent.isActionKey() of jdk1.2beta4F is not compatible with the one of jdk1.2beta3.

      This causes jck1.2beta2 test faulure:
      api/java_awt/Event/KeyEvent/manual.html#KeyEvent

      The test assumes VK_NONCONVERT to be non-action key
      (in accord with both the spec and beta3 implementation).

      The spec should be updated according to beta4 changes.

      ======================================================================

            sharonz Sharon Zakhour (Inactive)
            mgorshen Mikhail Gorshenev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: