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

MenuShortcut.toString() form should be specified

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 1.4.0
    • docs
    • sparc
    • solaris_2.5



      Name: apR10100 Date: 02/07/2002




      Specification for MenuShortcut.toString() should specify
      exactly form of the String that should be returned, since
      MenuShortcut should have consistent String representation
      across all platforms and implementations.

      --------------------------- JDK1.4 spec for MenuShortcut
      public String toString()
      Returns an internationalized description of the MenuShortcut.
      ---------------------------

      Currently JCK test verify that following should be returned:

      public String expectedToString(MenuShortcut menusc){
        int modifiers = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
        if (menusc.usesShiftModifier()) modifiers |= Event.SHIFT_MASK;
        String expected = KeyEvent.getKeyModifiersText(modifiers) + "+" + KeyEvent.getKeyText(menusc.getKey());
        return expected;
      }

      but test was invalidated by licensee request.

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

            sharonz Sharon Zakhour (Inactive)
            avpsunw Avp Avp (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: